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
基础教程推荐
- C# 从 List<List<int>> 中删除重 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
