Render asp.TextBox for html5 input type=quot;datequot;(为 html5 输入类型=“日期渲染 asp.TextBox)
问题描述
不知道之前有没有问过,也没找到.
I don't know if it has been asked before, couldn't find it either.
是否可以控制由 asp:TextBox 呈现的输入文本的类型?我想把它改成
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
推荐答案
.NET framework 4 的更新允许您指定类型属性
There is an update for .NET framework 4 which allows you to specify the type attribute
http://support.microsoft.com/kb/2468871.
在页面下方查看功能 3
功能 3
新语法让你定义一个HTML5 的 TextBox 控件兼容的.例如,以下代码定义了一个 TextBox 控件,它是兼容 HTML5:
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" />
这篇关于为 html5 输入类型=“日期"渲染 asp.TextBox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为 html5 输入类型=“日期"渲染 asp.TextBox


- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01