views:

171

answers:

2

I'm using ASP.NET MVC 2, DataAnnotation and MicrosoftMvcValidation.js for validation. I have two forms in my view..is there a way to use Validation Group for client side validation (like in ASP.NET Webforms).

thanks

A: 

The example I've seen with the nerd dinner (http://www.asp.net/mvc/videos/what-is-aspnet-mvc-80-minute-technical-video-for-developers-building-nerddinner) uses a partial class to modify the dinner model by adding validation to specific elements. This way validation can be handled at the server level but without server controls.

But... you can still use the validation controls with asp.net mvc if that's what you mean.

James Santiago
A: 

Did you mean to show summary of error(s)? If so you can use HTML helper for validation summary, like Html.ValidationSummary(...).

Hope this helps!

Shahnawaz Khan