Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey all,

this is really strange.

I have a form with appropriate validation set for each field
when the submit button has code inside its click method the validation wont fire
i tried commenting out everything in the click method and when i did all the validation worked fine

I even made sure that the button has its causes validation property to true and i used validation groups to make sure but it still did not work
please let me know how to solve this problem
many thanks
Posted
Comments
JoCodes 25-Nov-13 3:16am    
Have you tried Page.Validate() in the codebehind?
Reda Makarem 25-Nov-13 3:21am    
it does work but shouldnt my scenario be working by default?
JoCodes 25-Nov-13 3:32am    
This link gives a fair idea on it . http://weblogs.asp.net/rajbk/archive/2007/03/15/page-isvalid-and-validate.aspx
Er Daljeet Singh 25-Nov-13 4:44am    
put the code of the button_click function inside a condition
if(Page.IsValid)
{
//code here
}

i think your validation are working from server side.run code and check whether validater are working or not.
Reda Makarem 25-Nov-13 4:51am    
thats what im doing now but this doesnt fire any of my custom validators.. all other asp,net validators work, any ideas?

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