ASP.net验证电话号码 [英] ASP .net validation of phone number
本文介绍了ASP.net验证电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何在dottnet中验证电话号码
how we validate phone num in dottnet
推荐答案
可以从ASP.Net验证程序中使用.为此,您可以使用RegularExpression验证器,也可以是自定义验证器.
如果合适的话,还可以从AjaxToolkit看一下MaskedTextBox.
You can use from the ASP.Net Validators available. You can make use of RegularExpression validator or may be custom validator for this purpose.
Also take a look at MaskedTextBox from the AjaxToolkit if that suits you.
使用RegularExpressionValidator
教程:
http://www.w3schools.com/ASPNET/control_regularexpvalidator.asp [
Use a RegularExpressionValidator
Tutorial:
http://www.w3schools.com/ASPNET/control_regularexpvalidator.asp[^]
尝试阅读本文在CP上找到的内容.它对正则表达式过程给出了很好的解释,可以直接应用于您的问题.
使用正则表达式简化了验证 [
Try reading this article found here on CP. It gives a really good explanation of the reg ex process and can be directly applied to your question.
Validation with Regular Expressions Made Simple[^]
这篇关于ASP.net验证电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文