2

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

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.