I have a situation where i need the validators to fire on a page when it is loaded. But when i run Page.Validate(); the validators are not fired. I here this is because you cant do validation this early. Is there away around this?
A:
I think you cannot use Validate when page is loaded, it needs a postback. You can try to validate from javascript. Take a look at this Force Page Validation from Javascript
RioTera
2009-08-26 02:40:53
this is for client side validation, what about server side validation? Still thanks for your help.
Tim
2009-08-26 06:28:44
A:
If you call the said method (Page.Validate) in Page_Load your validators will validate, if they exist in the control collection at this point. Are you dealing with dynamic controls. This may require a slightly different approach.
brumScouse
2010-08-16 20:59:41