checkboxes
-
Hi I have a checkbox on my form and everything works grand. Except I want it to appear checked when I load the page. I was doing this: box.Checked = true; and it came up as being checked alright, but when I tried to check it off and submit the form, it still returns true. Whats the rumpus here could anyone tell me? Thank you in advance Stephen
-
Hi I have a checkbox on my form and everything works grand. Except I want it to appear checked when I load the page. I was doing this: box.Checked = true; and it came up as being checked alright, but when I tried to check it off and submit the form, it still returns true. Whats the rumpus here could anyone tell me? Thank you in advance Stephen
Hi sroberts82, My guess is that you have put this code in the page_load event, but everytime the page makes a post this code is executed, so what you need to do is enclose this initialization code inside this: if(!this.IsPostBack){ //Initialization code box.Checked = true; } This will be executed only the first time a user enters the page and not on subsequent posts. daniero