I have some validation JS code on client, that must be executed befor PostBack.
If this validation code return ‘false’, postback is needless.
How it can be disabled?
I have some validation JS code on client, that must be executed befor PostBack.
Share
Remember that the real validation should always happen on the server. Anything you do client-side is merely an optimization to save a few http round trips.
The easiest way to keep your client side and server-side validation in sync with ASP.Net is to use the validation controls. The validation controls will do both client side and server side validation, in such a way that if validation fails on the client it never posts to the server.
If you want to do something that’s not covered by the standard validation controls, you should either use a CustomValidator or inherit your own control from BaseValidator.