渲染asp.TextBox对HTML5输入类型="日期和QUOT; [英] Render asp.TextBox for html5 input type="date"
问题描述
我不知道它是否已经问过,可就是找不到它。
是否有可能控制由一个asp呈现的输入文本的类型:文本框?我想将其更改为<输入类型=日期>
任何建议或意见,欢迎,感谢
有是.NET Framework 4的更新,它允许您指定type属性。
http://support.microsoft.com/kb/2468871 。
请参阅功能3
一路下滑的页面
特点3
新语法允许您定义
TextBox控件是HTML5
兼容。例如,下面的
code定义了一个TextBox控件是
HTML5兼容的:< ASP:文本框=服务器TYPE =一些-HTML5型/>
块引用>I don't know if it has been asked before, couldn't find it either.
Is it possible to control the type of the input text that is rendered by an asp:TextBox? I would like to change it to
<input type="date">
any suggestions or comments are welcome, thanks
解决方案There is an update for .NET framework 4 which allows you to specify the type attribute
http://support.microsoft.com/kb/2468871.
See
feature 3
way down the pageFeature 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" />
这篇关于渲染asp.TextBox对HTML5输入类型=&QUOT;日期和QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!