My question is having a really deadlock situation over validation purpose.
I can do validation with two things in ASP.net
- Using validation controls
- Using jQuery
Now there are several situations:
If I use jQuery I can't use server side
page.isvalidmethod to perform validation from the server side.If I use the validation controls The page which actually loads the validation controls. It makes the page bulky. So I want to avoid that part too. I don't want my client with lower bandwidth to load the page very slow. Because of those validation control generating viewstates and custom validation JavaScripts.
If in browser the JavaScript debugging is turned off or the JavaScript execution is turned off . Neither jQuery nor validation controls on client side would occur. So in that case the only option I have is to use the page.isvalid method to validate the form from server side .
Now is it possible to consider all the three cases and perform a server side validation because JavaScript validation is vulnerable I really don't want to rely on it. But at the same time I see server side controls they are really bulky so without sacrificing my bandwidth (which definitely I won't want rather I would tend to use JavaScript validation). And also if in case my jQuery is failed due to JavaScript execution has turned off. How to perform server side validation without any kind of use of validation controls?