开发者

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

开发者 https://www.devze.com 2023-01-21 11:51 出处:网络
I have tried: 开发者_StackOverflow社区@Html.TextBoxFor(m => m.UserName, new {@class=\'textbox\'})

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

精彩评论

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