how to redirect to another view page using Ajax.BeginForm

ajax.beginform redirect to action

Type Following code in your view page
@using (Ajax.BeginForm(“Add”,“Home”, new AjaxOptions()
{
HttpMethod = “POST”,
OnSuccess = “Redirectfunction”
}))
And type following script in your head section
function Redirectfunction(data)
{
window.location.href = “Index”;
}

About the Author

avatar