views:

30

answers:

2

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

+5  A: 

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.

František Žiačik
k thank you for your answer
Lawrance Rozario
+1  A: 

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.

azamsharp
ya i expecting this......
Lawrance Rozario