OnServerValidate

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

I have 2 buttons on my ASP.NET page, one to Submit the user details and
1 to bring up a calendar. On the page I also have a custom validator
which calls a procedure via OnServerValidate.

The problem I have is that pressing the other button also triggers the
OnServerValidate. Does anybody know how I can stop this from happening?


Thanks,

Mike
 
Mike P said:
I have 2 buttons on my ASP.NET page, one to Submit the user details and
1 to bring up a calendar. On the page I also have a custom validator
which calls a procedure via OnServerValidate.

The problem I have is that pressing the other button also triggers the
OnServerValidate. Does anybody know how I can stop this from happening?


Thanks,

Mike

Property: CausesValidation = false
on the "calendar button"
 
You need to set the CausesValidation Property of the button object.
It should do the trick for you.
 
Back
Top