> It still have errorMessage.
>
> Can anyone help me?
Not until you actually tell us what the error message is...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
> I am using a RegularExpressionValidator and the ValidationExpression is
> "/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"
[quoted text clipped - 4 lines]
>
> Thanks
You probably don't want the "/" at the beginning and end: they would be
interpreted as literal "/" characters to match against, NOT regex
delimiters.
Also you don't need the ^ and $ here: the RegexValidator checks that the
entire string matches (as opposed to only a substring).
Hans Kesting
Hi Win,
As for the regular expression error, do you mean that the ASP.NET page will
raise exception when you try running the page that contains the regular
expressioni validator? Or you means the validator control will display
validation error?
For syntax of regex in ASP.NET context, you can refer to the following
articles:
#How To: Use Regular Expressions to Constrain Input in ASP.NET
http://msdn.microsoft.com/en-us/library/ms998267.aspx
#Regular Expressions in ASP.NET
http://msdn.microsoft.com/en-us/library/ms972966.aspx#regexnet_topic9
BTW, the regulator is a good regex tool built with .NET framework, I think
it will be helpful when we editing regex that will be used in .net
application:
http://sourceforge.net/projects/regulator
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "win" <a@a.com>
>Subject: Validator
>Date: Wed, 21 May 2008 18:19:23 +0800
>I am using a RegularExpressionValidator and the ValidationExpression is
>"/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/"
[quoted text clipped - 4 lines]
>
>Thanks
Steven Cheng [MSFT] - 26 May 2008 11:27 GMT
Hi Win,
Have you got any progress on this issue? If you need any other help,
welcome to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Content-Transfer-Encoding: 7bit
>From: stcheng@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Thu, 22 May 2008 03:04:17 GMT
>Subject: RE: Validator
>Hi Win,
>
[quoted text clipped - 51 lines]
>>
>>Thanks