Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a two textboxes and a button in an asp.net page,
both of two textboxes have a regular expression validator for TIME Format
when i click on button,its showing error message if the time format is incorrect
my problem,the button_click event is working even if the time is incorrect or not
Please help me
Posted
Comments
Toniyo Jackson 17-Mar-11 3:02am    
post your aspx code???

1 solution

Check if the CausesValidation property of the Button is set to True.

Update 1:
Have you tried entering some values (wrong value) on the textbox. Your expression should be smart to validate empty strings too.

Mark it as answer if it is helpful
 
Share this answer
 
v2
Comments
kishore Rajendran 17-Mar-11 2:58am    
already set to true,showing error after that
Venkatesh Mookkan 17-Mar-11 2:59am    
Please post your ASPX code. It would be easy for find the issue.
Venkatesh Mookkan 17-Mar-11 3:05am    
Updated the answer
kishore Rajendran 17-Mar-11 3:12am    
Yes my expression if for time format,its accept only xx:xx am/pm format,other it will show error message
Venkatesh Mookkan 17-Mar-11 3:41am    
Post your ASPX code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900