开发者

ASP.NET MVC 2 EnableClientValidation : validation group

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 Validat开发者_JAVA技巧ion Group for client side validation (like in ASP.NET Webforms).

thanks


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜