简体   繁体   中英

Can you Format input from a text box in C# without a masked text box?

我需要在我的C#Web应用程序中格式化许多文本框,以接受13个数字,一些接受10个数字,一些接受像“IS112”这样的组合我无法使用AJAX扩展找到任何不是掩盖文本框的内容我只是检查是否有任何方法,我必须添加扩展名并重新制作和ID我的文本框。

<asp:TextBox ID="txtBox" runat="server" MaxLength="13"></asp:TextBox>
This is a text Box
 <asp:RegularExpressionValidator ID="RegularExpressionValidator1"runat="server" ControlToValidate="txtBox"
ValidationExpression="^(\d{0,13})$" ErrorMessage="*Invalid Text Length:" text="*" Display="Dynamic" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM