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 8739277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:54:12+00:00 2026-06-13T10:54:12+00:00

I am binding repeater control with c# properties as below <asp:Repeater ID=repeaterInvoicesPaid OnItemCommand=ClientNameClicked runat=server>

  • 0

I am binding repeater control with c# properties as below

  <asp:Repeater ID="repeaterInvoicesPaid"    OnItemCommand="ClientNameClicked" runat="server">
               <HeaderTemplate>
            <table id="PaidInvoicesTable" cellspacing="0" cellpadding="0" style="width: 100%; font-size: 11px; border-right-width: 0; border-bottom-width: 0;"
            class="dxgvControl grid dxgvTable">
                    <thead>
                        <tr>
                            <td style="width: 150px;" class="dxgvHeader">Invoice #
                            </td>
                            <td style="width: 150px;" class="dxgvHeader">Client Name
                            </td>


                        </tr>
                    </thead>
              <tbody>
            </HeaderTemplate>

            <ItemTemplate>
                <tr class="dxgvDataRow">
                    <td class="dxgv">
                    <asp:Label ID="lblInvoiceID" Text='<%#Eval("InvoiceID")%>' runat="server" /> 
                    </td>
                    <td class="dxgv">
                   <asp:LinkButton ID="btnClientName"  CommandName="Click"  Text='<%#Eval("customer.FirstName")%>' runat="server"/>

                    </td>


                        <td class="dxgv">

           <asp:Label ID="lblCustomerid"   Visible="false"  Text=' <%#Eval("Customerid") %>' runat="server" />

          </td>
                </tr>
            </ItemTemplate>

   <FooterTemplate>

            </tbody> 
       </table>
        </FooterTemplate>
        </asp:Repeater>

Now i want to get corresponding customerid(suppose into a variable) from row when user will click on linkbutton of clientname at particular row .In C# ClientNameClicked event how can i get it ?

C# code:

  protected void ClientNameClicked(object sender ,   RepeaterCommandEventArgs e)
    {
       switch(e.CommandName)
       {
           case "Click":
           break;
    }
    }

Please Help.
Thanks in advance.

  • 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-06-13T10:54:13+00:00Added an answer on June 13, 2026 at 10:54 am

    Your link button should look like

    In the repeaters ItemCommand even use the code below:

    <asp:LinkButton ID="btnClientName"  CommandName="Click" CommandArgument='<%#Eval("Id")' Text='<%#Eval("customer.FirstName")%>' runat="server"/>
    
    protected void ItemCommand(object sender ,   RepeaterCommandEventArgs e)
    {
        switch(e.CommandName)
        {
           case "Click":
              var i  = Convert.ToInt32(e.CommandArgument); // You can get the Id 
           break;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following repeater code: <asp:Repeater ID=repMain runat=server OnItemCommand=repMain_ItemCommand EnableViewState=false> <ItemTemplate> <dmg:testcontrol runat=server
Microsoft's introduction to data-binding using the asp:Repeater control gives the syntax to fetch a
I'm using repeater control from asp.net for data binding. And for designing i used
In a repeater control I've Eval binding as: <%#Eval(PubDate, {0:dd-MMM-yyyy})%> But date time format
I am binding string array to the Repeater Control, string[] strPageSize = new string[25];
I have a DropDownList inside a repeater control in an ASP.NET page that has
I have an ASP.NET control that binds data to a repeater. Inside that repeater,
I am binding a List<string> to a Repeater control. Now I want to use
I am using an asp:Repeater control in my .aspx page that looks similar to:
I am using an asp:Repeater control in my .aspx page that looks similar to:

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.