about gridveiw ASP.NET2 and c#

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top