MVC4 Ajax.BeginForm not replacing UpdateTargetId

后端 未结 12 1426
野的像风
野的像风 2020-12-30 04:38

There are so many topics on SO about issues with the Ajax.BeginForm not correctly updating the target element with the return partial view:
mvc4 ajax updating same page<

12条回答
  •  忘掉有多难
    2020-12-30 05:37

    First, install 'Microsoft.JQuery.Unobtrusive.Ajax' from NuGet Manager and later include "~/Scripts/jquery.unobtrusive" in "BundleConfig" after including "jquery-{version}.js"; which will look something similar to this:

    bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js",
                    "~/Scripts/jquery.unobtrusive*));
    

提交回复
热议问题