if (!string.IsNullOrEmpty(returnUrl))
{
return Redirect(returnUrl);
}
return RedirectToAction("Index", "Estates");
以你的形式:
<% using (Html.BeginForm("Delete", "Estates",
new { returnUrl = Url.Action("Admin", "Estates") }))
{ %>
<%: Html.Hidden("EstateId", estate.EstateId) %>
<button type="submit" onclick="return DoDelete()">Delete</button>
<% } %>