Why page.isvalid




















IsValid is calculated serverside and doesn't know that you switched the javascript validation off clientside. Serverside you can check wheter Checkbox1 is checked to ignore validation i. Thank you pandeyism but this didn't answer the issue.

I found by myself the solution. The issue is that the server side doesn't know that the validation has been disabled on client side so you need to add to override the validation using the following code.

Home Categories. IsValid return false when disabled ASP. Net Validation using JavaScript. Need Help? Our Support Team is here to help. It is up to the developer to actually check to determine if the validation is valid for the page or not.

To fix this issue, we can simply update our code to check Page. IsValid before performing any actions in our button event. The above code shows how the first thing we check in the button click event is whether or not the page is valid.

This example shows an overly simplistic use of the validator controls and only touches on the required field validator. Questions or problems regarding this web site should be directed to webmaster JardineSoftware. You should check this property only after you have called the Page. NET server control that initiates form processing.

If you force validation of a validation group using the Validate method, then all validation controls in the specified validation group must validate successfully as well.

Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Skip to main content. This browser is no longer supported.



0コメント

  • 1000 / 1000