|
-
Oct 16th, 2007, 10:04 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] I want TextBox not to call the validation function when it loses the focus
Hi,
I have textbox and customvalidator, when the textbox loses the focus, the clientvalidationFunction and myCustomValidator_ServerValidate are called and the error message is displayed if the validation fails, what if I want the server and client validation functions to be called and validation error message displayed only when I click a certain button on the page and not when the textBox loses focus?
Thank you.
Thanks a lot for your help.
-
Oct 16th, 2007, 10:06 AM
#2
Re: I want TextBox not to call the validation function when it loses the focus
Set the textbox's CausesValidation property to false. Not sure if that's the right answer but try it.
-
Oct 16th, 2007, 12:49 PM
#3
Thread Starter
Fanatic Member
Re: I want TextBox not to call the validation function when it loses the focus
I tried it, no luck either mister Mendhak.
Thanks a lot for your help.
-
Oct 16th, 2007, 04:14 PM
#4
Re: I want TextBox not to call the validation function when it loses the focus
Don't set the ControlToValidate property. On a PostBack the ServerValidate event(s) will still fire, giving you a chance to validate the entire page...
Not sure about the Client validation however...
-
Oct 17th, 2007, 08:34 AM
#5
Thread Starter
Fanatic Member
Re: I want TextBox not to call the validation function when it loses the focus
thanks a lot, it works like a charm
Thanks a lot for your help.
-
Oct 17th, 2007, 08:40 AM
#6
Re: [RESOLVED] I want TextBox not to call the validation function when it loses the focus
It's odd that's worked for you, validators usually complain if you don't give it a ControlToValidate value.
-
Oct 17th, 2007, 12:16 PM
#7
Re: [RESOLVED] I want TextBox not to call the validation function when it loses the focus
Except the CustomValidator control. It is the only validator whose ControlToValidate property can be empty.
-
Oct 18th, 2007, 10:10 AM
#8
Re: [RESOLVED] I want TextBox not to call the validation function when it loses the f
Bruce learns something new every day.
-
Oct 18th, 2007, 10:19 AM
#9
Re: [RESOLVED] I want TextBox not to call the validation function when it loses the focus
Amazing what you can learn when you RTFM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|