What exactly is improved in MVC3 pertaining to validation?

时光总嘲笑我的痴心妄想 提交于 2019-12-31 05:36:07

问题


In asp.net-mvc-3 - Improved model validation with unobtrusive JavaScript and jQuery support.

I think, unobtrusive-validation is already present in asp.net-mvc-2

Question : What exactly is improved in MVC3 pertaining to client validation?


回答1:


I think, unobtrusive-validation is already present in asp.net-mvc-2

Ah no, it wasn't.

Question : What exactly is improved in MVC3 pertaining to client validation?

The Ajax.* helpers are now using HTML5 data-* attributes which are interpreted by the jquery unobtrusive validation scripts. In ASP.NET MVC 2 the Ajax.* helpers were polluting the HTML with javascript calling to the absolute legacy Microsoft*.js scripts.



来源:https://stackoverflow.com/questions/17336430/what-exactly-is-improved-in-mvc3-pertaining-to-validation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!