What's wrong with simply using the .Enabled property of fields A and B during
the SelectedIndexChanged event of the drop-down list? Better yet, use
javascript to enable/disable the fields, so its all done client-side? Either
way, this doesn't sound like a task for the CustomValidator. The
CustomValidator control is basically a label that turns on/off based on
conditional logic you set up in the control's event.
"" wrote:
> I have a relatively simple case where I have a form with two fields
> (call them A and B) which need to be enabled mutually exclusively
> depending on the state of a drop down. So if drop down is "A" then
> field A is populateable and if B then B.
>
> This would be relatively simple to do with a CustomValidator I
> imagine, but assuming I just wanted a serverside check, can anyone
> think of a way of using say the CompareValidator or something to do
> this check, even extending might be an option if it's less work than
> writing the whole thing from scratch with a customvalidator..
>
>
|