OnServerValidate

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
 
H

Hans Kesting

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"
 
P

Patrik Löwendahl

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

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top