|
 |
aspx thread: Validation Controls
Message #1 by Sridhar Raj G <Sridharr@i...> on Thu, 23 May 2002 17:24:45 +0530
|
|
Hi.,
Thanks in advance
I have a grave problem in My application,I have two asp:texbox
controls, now i need to validate either one of them and if any one control
holds a value not equal to null , i need to submit the page. I tried using
the validation control, and even comparision control, but in vain could not
solve my problem.
I searched MSDN, few .Net sites, But could not find the magical words that
solves my problem.
I appreciate, Solution from any one ASAP. with some sample code snippets.
Thanks Once mOre
Regards
Sridhar G.
Message #2 by Imar Spaanjaars <Imar@S...> on Thu, 23 May 2002 14:07:01 +0200
|
|
You can use a CustomValidator control. This allows you to hook up general
validation stuff to any of your controls, while still letting you write
customer code for your controls.
You'll benefit from Page.IsValid and the ValidationSummary etc. with
complete control over what and how to validate.
You can use it like this:
<asp:CustomValidator id="CustomValidator1" runat="server"
ClientValidationFunction="MyFunction()"
ErrorMessage="CustomValidator"></asp:CustomValidator>
HtH
Imar
At 05:24 PM 5/23/2002 +0530, you wrote:
>Hi.,
> Thanks in advance
>
> I have a grave problem in My application,I have two asp:texbox
>controls, now i need to validate either one of them and if any one control
>holds a value not equal to null , i need to submit the page. I tried using
>the validation control, and even comparision control, but in vain could not
>solve my problem.
>I searched MSDN, few .Net sites, But could not find the magical words that
>solves my problem.
>
>I appreciate, Solution from any one ASAP. with some sample code snippets.
>Thanks Once mOre
>
>Regards
>Sridhar G.
|
|
 |