Can anyone advise what is the best way of client and server side validatio.
Either we go for Data Annotation if it support with VS2008. Or go with Jquery ...
Can anybody guide me as well any example, link is appreciated.
Can anyone advise what is the best way of client and server side validatio.
Either we go for Data Annotation if it support with VS2008. Or go with Jquery ...
Can anybody guide me as well any example, link is appreciated.
xVal is highly recommended:
http://blog.codeville.net/2009/01/10/xval-a-validation-framework-for-aspnet-mvc/
With xVal you can do both client & server side with Data annotations & jQuery or other validation engines like castle....
The simple answer is "Both!"
You want your users to have a fast, smooth UI so instant feedback is essential (unless you can guarantee that your round-trip time is ultra-fast) and saves on round-trips. However, you cannot guarantee that only your clients with this validated input is being posted to your server so you need to validate there as well.
Both. See my blog article for an in-depth walkthrough and a demo project.
Data Annotations is a server side technology and jQuery is client side. To do both client/server validation you need both, its not a question of either/or.