Wednesday, October 12, 2011

Client side validation not working in ASP.MVC 3

Add the following lines to your view.

 

HtmlHelper.ClientValidationEnabled = true;
HtmlHelper.UnobtrusiveJavaScriptEnabled = true;



Add the following script files reference to your web page



  1. jquery-1.4.4.js

  2. jquery.validate.js

  3. jquery.validate.unobtrusive.js

1 comment: