CheckBox Problem
-
I am using CheckBox in my web form.But checked status always shownig false, Even I select that checkbox and I am also using Master Page in my Webform Do you have any Idea.
Thank & Regards Vijay s
-
hmm unless you have it set to false in the tag? Is there anything happening on the checkbox check i.e. someone ticks the box and a postback occurs? Can you post some of your code?
-
I am Using this simple code if (chkA.Checked == true) gType = "A,"; if (chkC.Checked == true) gType += "C,"; if (chkH.Checked == true) gType += "H,"; // gType = gType.Substring(0, gType.Length - 1);
Thank & Regards Vijay s
-
probably AutoPostBack="true"
-
Problem is my side.I only assigned "false" to that checkbox for some other reason in page load event.I dint notice that.thank you
Thank & Regards Vijay s
You know you can use Page_Init(Object sender, EventArgs e) event? In that even you can set default values. The Init is only executed at first load of the page.