开发者

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"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜