Manually bind JQuery validation after Ajax request

前端 未结 5 1337
轮回少年
轮回少年 2021-01-03 02:27

I\'m requesting an ASP.net MVC view into a live box and the view contains form fields that have been marked up with attributes to be used by JQuery\'s unobtrusive validators

5条回答
  •  悲哀的现实
    2021-01-03 03:13

    Another option, rather trick, which worked for me. Just add following line in the beginning of the partial view which is being returned by ajax call

    this.ViewContext.FormContext = new FormContext(); 
    

    Reference

提交回复
热议问题