Gridview/checkbox

Discussion in '.NET' started by excella, Feb 1, 2013.

  1. excella

    excella

    Joined:
    Feb 1, 2013
    Messages:
    1
    Likes Received:
    0
    I am using VS 2008. I have a gridview with checkboxes. i want to get the value of cell 1 during execution if the corresponding checkbox is checked.The code that i used given below .The problem is that during execution if i select a check box its checked value is not changing
     

    Attached Files:

    • 1.txt
      File size:
      1.2 KB
      Views:
      106
    • 2.txt
      File size:
      2.2 KB
      Views:
      126
    excella, Feb 1, 2013
    #1
    1. Advertisements

  2. excella

    bmxdad

    Joined:
    Jul 31, 2008
    Messages:
    2
    Likes Received:
    0
    Location:
    Puyallup, Washington
    Add an IsPostBack statement in your page_load. Otherwise the postback event will reset the checkbox.

    if(!IsPostBack)
    {
    // Do stuff on first page load
    }
     
    bmxdad, Jun 19, 2014
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.