asp.net mvc - How to disable jquery.unobstrusive and enable jquery.validate in MVC forms -


i have mvc form , using jquery.validate.js plugin validate controls. had requirement of making form submit value asynchronously, took advantage of ajax.beginform() , had include jquery.validate.unobtrusive.js plugin pass value asynchronously. problem when started use jquery.validate.unobtrusive.js plugin validation used validate using jquery.validate gone toss , validation not getting fired, instead data annotation validation getting fired dont want. link using

<script src="~/scripts/jquery/jquery.validate.min.js"></script>  <script src="~/scripts/jquery/additional-methods.min.js"></script>  <script src="~/scripts/jquery.validate.unobtrusive.js"></script> @using (ajax.beginform(new ajaxoptions { httpmethod = "post", onbegin = "onbegin", onsuccess = "success", onfailure = "fail", url = "~/usermanagement/editingpopup_create" })) {   @html.labelfor(model => model.firstname)                     @html.textboxfor(model => model.firstname, new { @class = "form-control", tabindex = 1 })                     @html.validationmessagefor(model => model.firstname)   <input type="submit" value="submit" class="btn-default" /> } 

can me on how should approach , why kind of problem arise. thank

well sorry, mistake. using

<script src="~/scripts/jquery.validate.unobtrusive.js"></script> 

when should have used

<script src="~/scripts/jquery.unobtrusive-ajax.js"></script> 

i never knew jquery.validate.unobtrusive.js & jquery.unobtrusive-ajax.js both different.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -