如何在文本框中以0:00格式显示值 [英] How to display the values in 0:00 format in text boxes
本文介绍了如何在文本框中以0:00格式显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在文本框中以
0:00
格式显示值。如果我输入1它应该显示1:00并且不允许使用字符。
我尝试过:
< asp:TableCell>
< asp:TextBox ID =txtOutagerunat =serverWidth =147pxVisible =trueonkeydown =return(!(event.keyCode> = 65)&& event.keyCode != 32);>< / ASP:文本框>
< asp:Label ID =lbloutrunat =serverText =In HoursForeColor =Red>< / asp:Label>
< / asp:TableCell>
解决方案
查看 ASP.NET C#中的AJAX控件工具包屏蔽编辑教程示例 - Ajax教程,技巧和代码示例 [ ^ ]
I want to display the values in
0:00
format in a text box. If i type 1 it should display 1:00 and characters should not allowed .
What I have tried:
<asp:TableCell> <asp:TextBox ID="txtOutage" runat="server" Width="147px" Visible="true" onkeydown="return (!(event.keyCode>=65) && event.keyCode!=32);"></asp:TextBox> <asp:Label ID="lblout" runat="server" Text="In Hours" ForeColor="Red"></asp:Label> </asp:TableCell>
解决方案
Check out AJAX Control ToolKit Masked Edit Tutorial Example in ASP.NET C# - Ajax Tutorials, Tricks, and Code Examples[^]
这篇关于如何在文本框中以0:00格式显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文