开发者

Regular Expression using ASP.NET

I would like to know about regular expression and text validators using ASP.NET. Do the tags used to control t开发者_如何学JAVAhe inputs only check data client side, or is the data also checked server side?


You might want to check this out

http://msdn.microsoft.com/en-us/library/ms972966.aspx

It is said :

"A few things to note about the RegularExpressionValidator:

  • It will never be activated by an empty string in the control it is validating. Only the RequiredFieldValidator catches empty strings
  • You do not need to specify beginning of string and end of string matching characters (^ and $)—they are assumed. If you add them, it won't hurt (or change) anything—it's simply unnecessary.
  • As with all validation controls, the validation is done client-side as well as server side. If your regular expression is not ECMAScript compliant, it will fail on the client. To avoid this, either ensure your expression is ECMAScript compliant, or set the control to perform its validation only on the server."


The validation controls validate on both the client and the server. Please learn to google your questions prior to asking for help - you'll become a better softare developer for it.


hope this will helps you

http://viralsarvaiya.wordpress.com/2009/03/13/aspnet-validation-controls/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜