Best way to do client/server validation in ASP.NET in 2010?
Posted
by punkouter
on Stack Overflow
See other posts from Stack Overflow
or by punkouter
Published on 2010-06-08T14:16:46Z
Indexed on
2010/06/08
14:22 UTC
Read the original article
Hit count: 149
First there was the ASP.NET validators and we used them... Then some people on the team did things manually in javascript... Then a bunch of jquery validation libraries came out... Then MVC2 came out with attributes as validators..
I work with apps that have alot of forms with alot of various validation (Some fields needs to be compared with other values in a DB so a postball/ajax call is required) .. Right now I have a mess of ASP.NET custom validators and functions that calculate on the server side as well.
Can I get some opinions on the best tool/combination to approach this job that can create the smallest/most elegant code? Pure server side solution? AJAX/Jquery? A certain plugin for jquery?
For example, I have 2 dates.. I want to make sure that the 1st date is less than the 2nd date... Are there jquery validators that encapsulate this? My feeling is if I can get jquery plugins to handle half the more basic validation for my that could cut my code in half.
© Stack Overflow or respective owner