Html.BeginForm with multiple htmlAttributes

asp.net-mvc-3

Solution

Use the following overload of `BeginForm`.

@using (Html.BeginForm("Logon", "Account", 
        new { returnUrl = Request.QueryString["ReturnUrl"] }, FormMethod.Post, 
        new { @class = "form"}))

Problem

I am using the Html.BeginForm and passing in a css class as per below: ``` @using (Html.BeginForm("Logon", "Account", FormMethod.Post, new { @class = "form" } )) ``` that works fine, but I want to add a returnURL querystring parameter after it but that doesn't seem to work: ``` @using (Html.BeginForm("Logon", "Account", FormMethod.Post, new { @class = "form", returnUrl = Request.QueryString["ReturnUrl"] })) ``` how can I add multiple htmlAttributes so that I can tell it my css class and a querystring parameter?

Original source