如何使用ragevalidator检查字符串长度? [英] how to use ragevalidator for checking string length?
本文介绍了如何使用ragevalidator检查字符串长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我只允许在文本框中键入8个长度的字符串.
Hi all,
i want to allow only 8 length character string to type in textbox.
how can i validate the textbox using ragevalidator?
推荐答案
设置您的文本框maxlength ="8",然后使用范围验证器使用Minimum ="=" maximumvalue = " Type ="string"
进行上述操作,然后说
Set you textbox maxlength="8" and then use range validator to give range using Minimum value="" maximumvalue="" Type="string"
Do the above one''s and then say
设置您的文本框的maxlength ="8"并只需使用RegularExpressionValidator
请参阅下面的链接,它可能对您有帮助
http://forums.asp.net/p/1553278/3813601.aspx [ ^ ]
Set your Textbox''s maxlength = "8" and simply use RegularExpressionValidator
See link below, it may help you
http://forums.asp.net/p/1553278/3813601.aspx[^]
这篇关于如何使用ragevalidator检查字符串长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文