开发者

What is Microsoft.MvcValidation used for in ASP.NET MVC 3 projects?

开发者 https://www.devze.com 2023-02-19 11:21 出处:网络
I\'m new to ASP.NET MVC and don\'t understand the purpose of all the JavaScript files that are added to the project by default.

I'm new to ASP.NET MVC and don't understand the purpose of all the JavaScript files that are added to the project by default.

What's the purpose of MicrosoftMvcValidation.js? Whatever it's used fo开发者_如何学运维r, can it be swapped out for a jquery-based implementation? If so, how?


MicrosoftMvcValidation.js will be used if you decide that you do not want to use the new unobtrusive jQuery validation on the client side.

You can make this choice for you entire applicastion in the web.config file here:

<appSettings>
    <add key="ClientValidationEnabled" value="true"/> 
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/> 
  </appSettings>

So in the above example the jQuery validation will be used.

0

精彩评论

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