Search code examples
javascriptasp.netmodel-view-controllerunobtrusive-validation

Disable Unobtrusive Validation in MVC ASP.net Project


I need to remove unobtrusive validation in my ASP.net MVC project because I am dynamically creating drop down lists.

I am attempting to use

    @{HtmlHelper.ClientValidationEnabled = false;}

but I get the error "HtmlHelper does not contain a definition for ClientValidationEnabled".

Does anyone know how to fix that or perhaps another solution to this problem? I really only need it disabled for one form.


Solution

  • @(ViewContext.ClientValidationEnabled = true)