I have a modal popup extender and have assigned a custom validator to a textbox in popup. It hits the Server validation function, fails the condition but instead of displaying the error message it closes. I believe I need to have a client side validation
instead of a server side so the postback does not close the pop up.
But in my validation function, I have to query the database for existance of a duplicate value (against what is in the textbox) and not sure how I can do this client side.
Can you please let me know if I can get away with just the server-side validation, or I need a client side, how I can set the validation rule.
If textbox is "tbInput", I need to run bool bIsDuplicate(tbInput.Text) and set Args.IsValid to its return value.
NoBullMan
Participant
1022 Points
788 Posts
Modal popup and custom validation
Feb 20, 2012 07:07 PM|LINK
Hi all,
I have a modal popup extender and have assigned a custom validator to a textbox in popup. It hits the Server validation function, fails the condition but instead of displaying the error message it closes. I believe I need to have a client side validation instead of a server side so the postback does not close the pop up.
But in my validation function, I have to query the database for existance of a duplicate value (against what is in the textbox) and not sure how I can do this client side.
Can you please let me know if I can get away with just the server-side validation, or I need a client side, how I can set the validation rule.
If textbox is "tbInput", I need to run bool bIsDuplicate(tbInput.Text) and set Args.IsValid to its return value.
Thanks.
MetalAsp.Net
All-Star
112718 Points
18367 Posts
Moderator
Re: Modal popup and custom validation
Feb 20, 2012 07:12 PM|LINK