How do I add the css class attribute to a textbox in razor?
I have tried:
开发者_StackOverflow社区@Html.TextBoxFor(m => m.UserName, new {@class='textbox'})
which isn't working.
@Html.TextBoxFor(m => m.UserName, new {@class="textbox"})
A c# string literal does not take single quotes.
'textbox' -> "textbox"
精彩评论