不知道以前有没有问过,也没找到。
是否可以控制 asp:TextBox 呈现的输入文本的类型?我想将其更改为 <input type="date">
欢迎任何建议或意见,谢谢
最佳答案
.NET Framework 4 有一个更新,允许您指定类型属性
http://support.microsoft.com/kb/2468871 .
请参阅页面下方的功能 3
Feature 3
New syntax lets you define a TextBox control that is HTML5 compatible. For example, the following code defines a TextBox control that is HTML5 compatible:
<asp:TextBox runat="server" type="some-HTML5-type" />
关于html - 为 html5 输入类型 ="date"呈现 asp.TextBox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2768515/