asp.net-mvc-ajax

How to get an ASP.NET MVC Ajax response to redirect to new page instead of inserting view into UpdateTargetId?

為{幸葍}努か 提交于 2019-11-26 15:08:55
I am using the Ajax.BeginForm to create a form the will do an ajax postback to a certain controller action and then if the action is successful, the user should get redirected to another page (if the action fails then a status message gets displayed using the AjaxOptions UpdateTargetId). using (Ajax.BeginForm("Delete", null, new { userId = Model.UserId }, new AjaxOptions { UpdateTargetId = "UserForm", LoadingElementId = "DeletingDiv" }, new { name = "DeleteForm", id = "DeleteForm" })) { [HTML DELETE BUTTON] } If the delete is successful I am returning a Redirect result: [Authorize] public