Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Use LinkButton within Templatefield of GridView.
If i will click that button,that value will display in a lable.in c# coding.
Posted

Use RowCommand Event of GridView

Check this link[^]
 
Share this answer
 
v2
XML
<asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="lnkSiteName" runat="server"
                                    NavigateUrl='<%# "pagename.aspx?queryStringId=" + DataBinder.Eval(Container.DataItem,"fieldName").ToString()%>'
                                     Text="View">
                                </asp:HyperLink>
                            </ItemTemplate>
            </asp:TemplateField>


you can use only Eval('fieldName') function instead of DataBinder.Eval(Container.DataItem,"fieldName")DataBinder.Eval
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900