Home All Groups Group Topic Archive Search About

Programmatically enabling Validation Controls

Author
2 Sep 2006 8:39 PM
Jav
I have RequiredFieldValidator controls in a FormView (EditTemplate) in a
UserControls which is placed on a Wizard which is on a Page.  They work fine.
I would like to enable/disable them programmatically. I can't seem to find a
reference to any of them.  I have tried FindControl without luck.  Have tried
looping through Page.Validators but that count is zero.  Intellisence fails
to show any of them in the UserControl.

Would appreciate any help
Jav

Author
4 Sep 2006 10:21 AM
offwhite@gmail.com
You will want to walk through it with the debugger to see where things
exist.  They may be buried deep within a templated control.  Either use
the Immediate Window or add a Watch for a few items as you walk the
code in the debugger.

If you could post the markup for the user control I may be able to tell
you how to reach your validator.

Brennan Stehling
http://brennan.offwhite.net/blog/

Jav wrote:
Show quoteHide quote
> I have RequiredFieldValidator controls in a FormView (EditTemplate) in a
> UserControls which is placed on a Wizard which is on a Page.  They work fine.
> I would like to enable/disable them programmatically. I can't seem to find a
> reference to any of them.  I have tried FindControl without luck.  Have tried
> looping through Page.Validators but that count is zero.  Intellisence fails
> to show any of them in the UserControl.
>
> Would appreciate any help
> Jav