Loading ...

Server side validation stopped working

0 (0votes)

Yesterday i was working on a registration page where if a person check the checkbox where the terms and conditions are

written only then he/she can register .So i used a client side validation if a person doesn't select the checkbox then the

alert box will appear where it is written that  you must follow the terms and conditions.


 But on doing this the server side validations stopped working . I culdn't find the reason why was it happening .I searched

it on google as well but culdn't find the solution to it. Then one of my colleague told me to use Page.Validate() method and  

 Page.IsValid on the button click and it worked .


protected void btnRegister_Click(object sender, EventArgs e)




          if (Page.IsValid)



Comments (1)

Using javascript , can give such error..
try using Custom validator for CheckBox!!!

Top Posts