- Joined
- Nov 12, 2008
- Messages
- 3
- Reaction score
- 0
I modified a gridview (that I bind it using the withard )to make one of its columns be linked button by modify the design code of the column,I need when click on the button an information about the row contained the button like the index
but when trying to get that it always return -1 how can I fix that
<asp:TemplateField HeaderText="BirthDate" SortExpression="BirthDate">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("BirthDate") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="Label1" runat="server" Text='<%# Bind("BirthDate") %>' OnClick="Label1_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
but when trying to get that it always return -1 how can I fix that
<asp:TemplateField HeaderText="BirthDate" SortExpression="BirthDate">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("BirthDate") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="Label1" runat="server" Text='<%# Bind("BirthDate") %>' OnClick="Label1_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>