Saturday, September 15, 2012

MVC 3 Reload Partial View with Validations

 $('#partialcontroldiv').load('@Url.Content("~/ControlerName/ActionName")?id=' + id, '', function () {               
              //below lines to reapply dataannotation validation on partial view
                $('form').removeData("validator");
                $("form").removeData("unobtrusiveValidation");
                $.validator.unobtrusive.parse(document);


            });

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates