Hi everybody
Validation controls are great but i have a scenario where i do not know how
to use them so i am doing my validation on the server.
Let's say I have a Web Form with :
Two Textboxes : Textbox_1, Textbox_2
Two Checkboxes : Checkbox_1, Checkbox_2
A Button : btnSubmit
What I want is :
If Checkbox_1 is checked then Textbox_1 is required and it should contain
Email
If Checkbox_2 is checked then Textbox_2 is required and it should contain
numeric values
If both Checkboxes are checked then both Textboxes are required
If no Checkbox is checked then nothing is required.
I know it should be done using custom validator but cannot make it easily.
At present all my validation code is in the btnSubmit_Click method but that
way i cannot use the advantages of validation controls.
Thanks in advance
Raja