about gridveiw ASP.NET2 and c#

Discussion in '.NET' started by Ali.M.Habib, Nov 18, 2008.

  1. Ali.M.Habib

    Ali.M.Habib

    Joined:
    Nov 12, 2008
    Messages:
    3
    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>
    Ali.M.Habib, Nov 18, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anders S. Willumsen

    Partial class and code behind in asp.net2

    Anders S. Willumsen, Jul 31, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,983
    Scott Allen
    Aug 1, 2005
  2. bb
    Replies:
    2
    Views:
    361
  3. gerinjacob
    Replies:
    0
    Views:
    415
    gerinjacob
    Sep 3, 2006
  4. Venu
    Replies:
    0
    Views:
    315
  5. Jeremie Legault

    ASP.NET Page ASP.NET2.0

    Jeremie Legault, Nov 23, 2005, in forum: ASP General
    Replies:
    0
    Views:
    113
    Jeremie Legault
    Nov 23, 2005
Loading...

Share This Page