我曾尝试:

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

这是行不通的。

有帮助吗?

解决方案

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

一个C#字符串文字不采取单引号。

'文字框' - > “文本”

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top