I have a GridView in which I have put an extra column Details, and in each row of the GridView, I have a LinkButton called Details. So when I click this I want an event to trigger.
The asp.net code is:
<asp:TemplateField HeaderText="Details">
<ItemTemplate>
<asp:LinkButton ID="Details" runat="server" Text="Details"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
Kindly help. Thank you.
Then use the
LinkButton.Click-event:in codebehind:
If you need the
GridViewRowof theGridViewwhere the user clicked the link, for example to find controls in othertemplateFields, you can use theNamingContainerproperty.