store the emp_no into a string when check the checkbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sana krishna
    New Member
    • Apr 2008
    • 7

    store the emp_no into a string when check the checkbox

    i use ASP.NET 2005
    I use gridview to display the Employ information.And display a checkbox filed inside the gridview add as a template.
    I want to store the emp_no into a variable when i checked this chechbox corresponding to the field(row).
    Please anybody help me.If it is possible.
    my code-----
    <asp:GridView ID="grdempinf" runat="server" AutoGenerateSel ectButton="True " OnSelectedIndex Changed="grdemp inf_SelectedInd exChanged">
    <Columns>
    <asp:TemplateFi eld HeaderText="Emp loy">
    <ItemTemplate >
    <asp:CheckBox ID="chkemp" runat="server"/>
    </ItemTemplate>
    </asp:TemplateFie ld>
  • balame2004
    New Member
    • Mar 2008
    • 142

    #2
    Originally posted by sana krishna
    i use ASP.NET 2005
    I use gridview to display the Employ information.And display a checkbox filed inside the gridview add as a template.
    I want to store the emp_no into a variable when i checked this chechbox corresponding to the field(row).
    Please anybody help me.If it is possible.
    my code-----
    <asp:GridView ID="grdempinf" runat="server" AutoGenerateSel ectButton="True " OnSelectedIndex Changed="grdemp inf_SelectedInd exChanged">
    <Columns>
    <asp:TemplateFi eld HeaderText="Emp loy">
    <ItemTemplate >
    <asp:CheckBox ID="chkemp" runat="server"/>
    </ItemTemplate>
    </asp:TemplateFie ld>

    Hi,

    Add OnCheck event to the checkbox and write relevant code in the event method to save emp_no into a variable

    Cheers,
    Balaji U

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      @OP Please do not double post.
      You other identical thread has been removed.

      Comment

      Working...