TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
scampercat
NA
189
0
regular expression validator
Aug 15 2012 3:58 PM
In a C# 2010 web form application, I have a regular expression validator that validates if a date is in mm/dd/yyyy format. The control works fine however the message quickly appears when the user enters the date and goes away. The message also appears when the user clicks the next button. I only want the message to appear when the user clicks the 'next' button.
The following is my code:
<div> <asp:RegularExpressionValidator ID="RegExpresValdate" runat="server" ControlToValidate="txtDate" CssClass="errorStyle"
ValidationExpression="^(0[1-9]|1[012])[/](0[1-9]|[12][0-9]|3[01])[/](19|20)\d\d$"
ErrorMessage="Please enter date in valid format (mm/dd/yyyy).">
</asp:RegularExpressionValidator>
</div>
Can you tell me what I can do to have the message only display when the user clicks the next button?
Reply
Answers (
2
)
input data in text box save in gridview through through button click in C#.asp.net
maintain scrollbar position