Click here to Skip to main content
15,882,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void btnget_Click(object sender, EventArgs e)
       {
           foreach (GridViewRow row in GridView1.Rows)
           {

               CheckBox ChkData = (CheckBox)row.FindControl("chkSelect");

               if (ChkData.Checked == true)
               {

                   string firstname = Convert.ToString(((Label)row.FindControl("labelfirstname")).Text);
                   string lastname = Convert.ToString(((Label)row.FindControl("labellastname")).Text);
                   string email = Convert.ToString(((Label)row.FindControl("email")).Text);
                   string reemail = Convert.ToString(((Label)row.FindControl("reemail")).Text);
                   string newpassword = Convert.ToString(((Label)row.FindControl("newpassword")).Text);
                   string birthday = Convert.ToString(((Label)row.FindControl("birthday")).Text);
                   string gender = Convert.ToString(((Label)row.FindControl("gender")).Text);




               }



in this coding the checkbox value should come false...pls help....
Posted
Comments
ZurdoDev 20-May-14 9:17am    
Where are you stuck? I do not understand your question.
Francine DeGrood Taylor 20-May-14 18:56pm    
What is the error that you are seeing? Or are you saying that even if you expect the checkbox to be unchecked, the .Checked value is true?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900