My view
<div id="ValidationSummary">
@Html.Partial("ValidationSummary")
</div>
@using (Ajax.BeginForm("Index", //<-- Action name
"JobDetails", //<-- Controller name
new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "ValidationSummary" }))
{
}
I want the ValidationSummary to replace. But it changes my url to JobDetails
Make sure you have added the following script to your page:
jquery.unobtrusive-ajax.jsIn ASP.NET MVC 3, jQuery is the default client side framework used for client side validation and Ajax.
Ajax helpers such as Ajax.BeginForm and Ajax.ActionLink emit HTML5 data-* attributes that are interpreted by the
jquery.unobtrusive-ajax.jsscript and AJAXified in this way.Also make sure that you have removed all references to
Microsoft*.jsscripts. Those are obsolete and should no longer be used in ASP.NET MVC 3.