【发布时间】:2015-12-30 09:12:09
【问题描述】:
我想设置它,以便您只能在文本框中输入值,简单明了。但是图片显示了我得到的结果。知道问题是什么吗?几个月前我设置了一个这样的文本框,所以我知道如果这应该可以工作的话。
HTML代码:
if (Roles.IsUserInRole(WebSecurity.CurrentUserName, "Admin"))
{
@:<p><b>Customer ID:</b> @Html.TextBox("SearchString2", new {@type="number"})</p>
}
提前致谢。
【问题讨论】:
-
@Html.TextBox("SearchString2", null, new { @type="number" })- 你使用了错误的重载 -
您应该将此作为答案发布,我会标记它:) @StephenMuecke
标签: html asp.net-mvc asp.net-mvc-4