The default template in MVC3 sets a 'returnurl' variable in the query string of the logon page. This page then posts back to a controller
@using (Html.BeginForm()) {
That is then picked up in the controller like so
[HttpPost]
public ActionResult LogOn(LogOnModel model, string returnUrl)
{
I wanted to add a CSS class to the form so I changed the helper to:
@using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "form-horizontal" }))
But now information in the query string isn't getting set in the controller.
I could always set a hidden input value to the retrunurl in the form but I didn't know if there was a simpler way.
Thanks