Lawrance Rozario
Lawrance Rozario

Reputation: 461

ASP .net validations

For validation in ASP.Net which one is better validation controls or JavaScript coding

Upvotes: 2

Views: 93

Answers (2)

azamsharp
azamsharp

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

František Žiačik
František Žiačik

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

Related Questions