Reputation: 461
For validation in ASP.Net which one is better validation controls or JavaScript coding
Upvotes: 2
Views: 93
Reputation: 20096
For WebForms I would suggest to use the Validator controls provided by Microsoft. The Validator controls by Microsoft validate the controls on the client side as well as on the server side.
Upvotes: 1
Reputation: 7614
Javascript validations can be easily overridden by potential hackers, they are just for user comfort (not requiring to postback). You should always do a server-side validation.
Validation controls take care of this automatically (provide client and server-side validations), so it's better to use them unless you do server validations on your own.
Upvotes: 5