【发布时间】:2025-11-29 23:10:01
【问题描述】:
我有一个 HTML input 控件
<input id="textBox1" class="form-control" runat="server"/>
我添加了以下 C# 代码以使其成为数字上下控件:
textBox1.Attributes["type"] = "number";
textBox1.Attributes["min"] = "0";
textBox1.Attributes["max"] = "50";
textBox1.Attributes["step"] = "1";
这在 Chrome 中运行良好,但在 Internet Explorer 中不显示 updown 按钮。
我应该怎么做才能在 IE 中也显示按钮?
我知道here 有人问过类似的问题,但我认为在 Sachin Gupta 的回答中建议here 在代码中添加属性可以克服这个问题。
【问题讨论】:
标签: c# asp.net webforms numericupdown