all groups > asp.net building controls > may 2005 >
You're in the

asp.net building controls

group:

Problem Facing in Server Side Validation.


Problem Facing in Server Side Validation. msnews.microsoft.com
5/20/2005 12:00:00 AM
asp.net building controls:
Hi All,

I m facing problem in Server Side Validation.
For Example The Scenario is=20

I have two fields on the page
1 Country Dropdown List
2 Province Textbox
3 State Dropdown List

I put two validation controls on the page

1 one is RequiredFieldValidator for Province Textbox
2 second is CompareValidator for State Dropdown List

If the Country USA is selected then State should be validated whether a =
valid state is selected or not and Province Textbox should not =
validated.
If the Country other than USA is selected then Province Textbox is =
validated and State Dropdown List should not be validated.

But on the server when i call Page.Validate() method this validate both =
controls whatever is the Country is selected.
How can i disable the validation on ther server regarding of my choice.


Regards,
Re: Problem Facing in Server Side Validation. msnews.microsoft.com
5/20/2005 12:00:00 AM
I have done it by removing the relative validator from the =
page.validator collection on my choice.
If any one have any other idea then please tell me

Thanks
Muhammad Jamil Nawaz
[quoted text, click to view]
Hi All,

I m facing problem in Server Side Validation.
For Example The Scenario is=20

I have two fields on the page
1 Country Dropdown List
2 Province Textbox
3 State Dropdown List

I put two validation controls on the page

1 one is RequiredFieldValidator for Province Textbox
2 second is CompareValidator for State Dropdown List

If the Country USA is selected then State should be validated whether =
a valid state is selected or not and Province Textbox should not =
validated.
If the Country other than USA is selected then Province Textbox is =
validated and State Dropdown List should not be validated.

But on the server when i call Page.Validate() method this validate =
both controls whatever is the Country is selected.
How can i disable the validation on ther server regarding of my =
choice.


Regards,
AddThis Social Bookmark Button