How do I add the css class attribute to a textbox in razor?

.net, asp.net-mvc, razor

Solution

@Html.TextBoxFor(m => m.UserName, new {@class="textbox"})

A c# string literal does not take single quotes.

'textbox' -> "textbox"

Problem

I have tried: ``` @Html.TextBoxFor(m => m.UserName, new {@class='textbox'}) ``` which isn't working.

Original source