ASP.NET MVC 4 AJAX Submit Form not working ASP.NET MVC 4 AJAX Submit Form not working ajax ajax

ASP.NET MVC 4 AJAX Submit Form not working


Is there something I'm missing?

Maybe you are missing the unobtrusive ajax script:

<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>


if i am understood correct, you are trying to post the data to controller, after successful you need to go to home page ?? if not can you clarify. so that will try to help you

if (ModelState.IsValid)    {        _repository.Save(user);        TempData["message"] = String.Format("{0} has been saved.", user.Username);        return RedirectToAction("yourActionToRedirect");  // after succesfull it will go to the index view    }


I had the same kind of problem... I've updated all the js files with nuget package console.

just my 2 cents, but also at the time of writing, the jquery.unobtrusive.ajax file does contain calls to the deprecated jquery function '.live' (=> it's deleted from jquery 1.9+ version) jquery live

I think there are like 4 occurrences that you'll have to change with .on, now it works fine ;-)