How to Disable Validation Events?
-
Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..
-
Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..
-
Hi innocent73, just make the "CausesValidation" property of that Button(for which you dont want the validation to be executed)to "False". Tirthadip
Thank you so much....That's the answer!!
-
Hello Friends, I have a webform. There are 11 "RequiredFieldValidator" controls on this web form. If something goes wrong then validation controls warn me. That's ok. There is another button on this webform that navigates to another webform.When I click this button validation controls dont allow me to navigate. But suppose that I will do nothing on this page and I will navigate another page..How can I disable the effect of these validationcontrols when I click the button. Please Help..
Good Question. I just face this problem and find the solution. So i glad to help to anybody. see , when u create the requirefieldvalidatio at design time... set the property of it "EANBLED=FALSE" so when u want to enable it then write the code for it like "requirefieldvalidator1.Enabled=True" and when u want to disable it then set the property "False" i will give one more example there is two button. like " save " and "cancle" so u want "cancle" button cant fire the requirefieldvalidator then set the property of "cancle" like "causevalidation=False" it will work 100% so enjoy.. :) Dipan Patel.