Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3790914
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:23:18+00:00 2026-05-19T12:23:18+00:00

I need to make an image button in the layout template of ListView, when

  • 0

I need to make an image button in the layout template of ListView,
when i click on the button it should open the insert template so i can insert a new record
here is my ListView:

<asp:ListView ID="LVCategories" runat="server" DataKeyNames="CatID" DataSourceID="CategoriesDS" EnableModelValidation="True">
<AlternatingItemTemplate>
    <tr style="">
        <td>
            <asp:Label ID="CatIDLabel" runat="server" Text='<%# Eval("CatID") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleLabel" runat="server" Text='<%# Eval("CatTitle") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionLabel" runat="server" Text='<%# Eval("CatDescription") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleArLabel" runat="server" Text='<%# Eval("CatTitleAr") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionArLabel" runat="server" Text='<%# Eval("CatDescriptionAr") %>' />
        </td>
        <td>
            <asp:Label ID="PictureIDLabel" runat="server" Text='<%# Eval("PictureID") %>' />
        </td>
        <td>
            <asp:CheckBox ID="PublishedCheckBox" runat="server" Checked='<%# Eval("Published") %>' Enabled="false" />
        </td>
        <td>
            <asp:Label ID="DisplayOrderLabel" runat="server" Text='<%# Eval("DisplayOrder") %>' />
        </td>
        <td>
            <asp:Label ID="CreatedOnLabel" runat="server" Text='<%# Eval("CreatedOn") %>' />
        </td>
    </tr>
</AlternatingItemTemplate>
<EditItemTemplate>
    <tr style="">
        <td>
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
        </td>
        <td>
            <asp:Label ID="CatIDLabel1" runat="server" Text='<%# Eval("CatID") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatTitleTextBox" runat="server" Text='<%# Bind("CatTitle") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatDescriptionTextBox" runat="server" Text='<%# Bind("CatDescription") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatTitleArTextBox" runat="server" ext='<%# Bind("CatTitleAr") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatDescriptionArTextBox" runat="server" Text='<%# Bind("CatDescriptionAr") %>' />
        </td>
        <td>
            <asp:TextBox ID="PictureIDTextBox" runat="server" Text='<%# Bind("PictureID") %>' />
        </td>
        <td>
            <asp:CheckBox ID="PublishedCheckBox" runat="server" Checked='<%# Bind("Published") %>' />
        </td>
        <td>
            <asp:TextBox ID="DisplayOrderTextBox" runat="server" Text='<%# Bind("DisplayOrder") %>' />
        </td>
        <td>
            <asp:TextBox ID="CreatedOnTextBox" runat="server" Text='<%# Bind("CreatedOn") %>' />
        </td>
    </tr>
</EditItemTemplate>
<EmptyDataTemplate>
    <table runat="server" style="">
        <tr>
            <td>
                No data was returned.
            </td>
        </tr>
    </table>
</EmptyDataTemplate>
<InsertItemTemplate>
    <tr style="">
        <td>
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert"  Text="Insert" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
        </td>
        <td>
            <asp:TextBox ID="CatIDTextBox" runat="server" Text='<%# Bind("CatID") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatTitleTextBox" runat="server" Text='<%# Bind("CatTitle") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatDescriptionTextBox" runat="server" Text='<%# Bind("CatDescription") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatTitleArTextBox" runat="server" Text='<%# Bind("CatTitleAr") %>' />
        </td>
        <td>
            <asp:TextBox ID="CatDescriptionArTextBox" runat="server" Text='<%# Bind("CatDescriptionAr") %>' />
        </td>
        <td>
            <asp:TextBox ID="PictureIDTextBox" runat="server" Text='<%# Bind("PictureID") %>' />
        </td>
        <td>
            <asp:CheckBox ID="PublishedCheckBox" runat="server" Checked='<%# Bind("Published") %>' />
        </td>
        <td>
            <asp:TextBox ID="DisplayOrderTextBox" runat="server" Text='<%# Bind("DisplayOrder") %>' />
        </td>
        <td>
            <asp:TextBox ID="CreatedOnTextBox" runat="server" Text='<%# Bind("CreatedOn") %>' />
        </td>
    </tr>
</InsertItemTemplate>
<ItemTemplate>
    <tr style="">
        <td>
            <asp:Label ID="CatIDLabel" runat="server" Text='<%# Eval("CatID") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleLabel" runat="server" Text='<%# Eval("CatTitle") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionLabel" runat="server" Text='<%# Eval("CatDescription") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleArLabel" runat="server" Text='<%# Eval("CatTitleAr") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionArLabel" runat="server" Text='<%# Eval("CatDescriptionAr") %>' />
        </td>
        <td>
            <asp:Label ID="PictureIDLabel" runat="server" Text='<%# Eval("PictureID") %>' />
        </td>
        <td>
            <asp:CheckBox ID="PublishedCheckBox" runat="server" Checked='<%# Eval("Published") %>' Enabled="false" />
        </td>
        <td>
            <asp:Label ID="DisplayOrderLabel" runat="server" Text='<%# Eval("DisplayOrder") %>' />
        </td>
        <td>
            <asp:Label ID="CreatedOnLabel" runat="server" Text='<%# Eval("CreatedOn") %>' />
        </td>
    </tr>
</ItemTemplate>
<LayoutTemplate>
    <table runat="server">
        <tr runat="server">
            <td runat="server">
                <table ID="itemPlaceholderContainer" runat="server" border="0" style="">
                    <tr runat="server" style="">
                        <th runat="server">
                            <asp:ImageButton ID="btnNew" runat="server" CommandName="New" />
                             <%--<asp:ImageButton ID="NewCatbtn" runat="server" CommandName="Insert" ImageUrl="~/ADMIN/themes/Img/New.png" AlternateText="Click Here To Add New" OnClick="OpenTheInsertTemplates"/>--%>
                             </th>
                        <th runat="server">CatTitle</th>
                        <th runat="server">CatDescription</th>
                        <th runat="server">CatTitleAr</th>
                        <th runat="server">atDescriptionAr</th>
                        <th runat="server">PictureID</th>
                        <th runat="server">Published</th>
                        <th runat="server">DisplayOrder</th>
                        <th runat="server">CreatedOn</th>
                    </tr>
                    <tr ID="itemPlaceholder" runat="server"></tr>
                </table>
            </td>
        </tr>
        <tr runat="server">
            <td runat="server" style=""></td>
        </tr>
    </table>
</LayoutTemplate>
<SelectedItemTemplate>
    <tr style="">
        <td>
            <asp:Label ID="CatIDLabel" runat="server" Text='<%# Eval("CatID") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleLabel" runat="server" Text='<%# Eval("CatTitle") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionLabel" runat="server" 
                Text='<%# Eval("CatDescription") %>' />
        </td>
        <td>
            <asp:Label ID="CatTitleArLabel" runat="server" 
                Text='<%# Eval("CatTitleAr") %>' />
        </td>
        <td>
            <asp:Label ID="CatDescriptionArLabel" runat="server" 
                Text='<%# Eval("CatDescriptionAr") %>' />
        </td>
        <td>
            <asp:Label ID="PictureIDLabel" runat="server" Text='<%# Eval("PictureID") %>' />
        </td>
        <td>
            <asp:CheckBox ID="PublishedCheckBox" runat="server" 
                Checked='<%# Eval("Published") %>' Enabled="false" />
        </td>
        <td>
            <asp:Label ID="DisplayOrderLabel" runat="server" 
                Text='<%# Eval("DisplayOrder") %>' />
        </td>
        <td>
            <asp:Label ID="CreatedOnLabel" runat="server" Text='<%# Eval("CreatedOn") %>' />
        </td>
    </tr>
</SelectedItemTemplate>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:23:19+00:00Added an answer on May 19, 2026 at 12:23 pm
    <asp:Button runat="server" ID="cmdInsert" CommandName="Insert" Text="Insert" />
    
    Protected Sub ListView1_ItemInserting (ByVal sender As Object, ByVal e as ListViewEditEventArgs)
        ' ... '
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

![enter image description here][1] I want to make a tab layout application, in which
I am creating a Image button from PNG icons, I need to make a
I use an untypical image background inside a button. I need to make this
I need to make an image view animate it's self on and off of
I need to make a thumbnail of an image after successfully uploaded the image
I need to make the program which have one form that contains PNG image
I make an app that have to printing image. I need to print image
I need to make javascript code to swap images with option change. Here is
I have a normal image for delete and an Asp.Net button. If I click
I have an image that I will use as the button. I need some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.