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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top