This should replace just the UpdateTarget, but it does not, it replaces the entire page and I don't see why. The correct partial view is being returned, but instead of replacing the target id, it is replacing the entire page.
<div id="magHeader">
<p>this is a test.</p>
@Ajax.ActionLink("Edit", "GetEditor", "Home", new AjaxOptions(){ UpdateTargetId = "magHeader", InsertionMode = InsertionMode.Replace})
</div>
At runtime, the link looks like this:
<a href="/Home/GetEditor" data-ajax-update="#magHeader" data-ajax-mode="replace" data-ajax="true">Edit</a>
Is there something that I am doing wrong? Have done this successfully in the past with no issues.
Edit The underlying reason for this issue is that in VS 2012, you only needed to add a reference to the JQueryVal bundle to make this work. However, in 2013, the BundleConfig.cs was changed so that the JQueryVal bundle no longer includes JQuery.Unobtrusive. So the simple fix is to add it back into the bundle:
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
Then all will work as expected.