ASP.NET——输入验证——服务器验证

ASP.NET输入验证有两种方式:

1.使用表单提交数据(input),使用JS校验。 

2.使用服务器控件(textbox),使用RegularExpressionValidator服务器控件校验。

  本文讲述服务器控件校验,即RegularExpressionValidator语法规则:

   \d:表示一位0-9的数字。

   \d{n}:表示n位0-9的数字。

   

posted @ 2016-05-16 15:11  preditctfuture  阅读(258)  评论(0编辑  收藏  举报