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

  • Home
  • SEARCH
  • 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 9218777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:56:29+00:00 2026-06-18T02:56:29+00:00

I am developing a aspx page with Gridview control. here i am pasting my

  • 0

I am developing a aspx page with Gridview control. here i am pasting my code

                    <Columns>

                     <asp:TemplateField HeaderText="Request">
                    <ItemTemplate>
                    <asp:LinkButton ID="sendrequest" runat="server" Text="SendRequest" CommandName="SendRequest"></asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="FirstName">
                    <ItemTemplate>
                    <asp:Label ID="fname" runat="server" Text='<%#Eval("fname") %>'></asp:Label>
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="LastName">
                    <ItemTemplate>
                    <asp:Label ID="lname" runat="server" Text='<%#Eval("lname") %>'></asp:Label>
                    </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="EMailID">
                    <ItemTemplate>
                    <asp:Label ID="email" runat="server" Text='<%#Eval("email") %>'></asp:Label>
                    </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Image">
                    <ItemTemplate>
                    <asp:Image ID="img" runat="server" ImageUrl='<%#Eval("imagepath") %>' Width="100" Height="100" />
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Request">
                    <ItemTemplate>
                    <asp:LinkButton ID="viewprofile" runat="server" Text="ViewFullProfile" CommandName="ViewProfile"
                    a href ='<%#"ViewProfile.aspx?email="+DataBinder.Eval(Container.DataItem,"email") %>'>
                    </asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField>


                    </Columns>



                </asp:GridView>

My question is i need email value of which LinkButton(SendRequest) clicked that row email value

please help me

  • 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-18T02:56:31+00:00Added an answer on June 18, 2026 at 2:56 am

    Handle the GridView RowCommand event:

    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) 
    { 
        if (e.CommandName.Equals("SendRequest")) 
        { 
           string strEmail = GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value.ToString();
           lbltest.Text = strEmail; 
        } 
    } 
    

    that is assuming you have the DataKeyNames set as email.
    You must also set the CommandArgument of the sendRequest button to

    CommandArgument="<%# Container.DataItemIndex %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a dynamic data web app. On list.aspx page it has GridViewPager control
I am developing a project using codemirror in an aspx page. Here is my
I am developing an asp.net web site. I have an aspx page. I want
I am developing a aspx page. In the page I have three dropdownlists and
I am developing an user authentication site. I have a login page, Login.aspx in
I am developing an .aspx page which will ultimately launch an applet after the
We are developing an ASPX (.NET 2.0) page that includes a select list with
I'm developing an ASP.NET 3.5 application with Visual Studio 2008. My default page has
I am currently developing a C# based asp.net page. I am using the Devexpress
I'm developing a Facebook application. Which is a usual aspx page with a datagrid

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.