1. Controllerthis
[HttpPost]
public ActionResult LogOn(LogOnModel model, string returnUrl)spa
2. Vieworm
@model MvcApplication2.Models.LogOnModel
string
@{it
ViewBag.Title = "Log On";
io
string retUrl = "";model
if (ViewContext.HttpContext.Request.UrlReferrer != null)co
{background
retUrl =
ViewContext.HttpContext.Request.UrlReferrer.PathAndQuery;new
}
}
......
@using (Html.BeginForm("Logon", "Account",
new { model = this.Model, returnUrl = retUrl }))
......