Programmatically enabling Validation Controls

Discussion in 'ASP .Net Web Controls' started by Jav, Sep 2, 2006.

  1. Jav

    Jav Guest

    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
     
    Jav, Sep 2, 2006
    #1
    1. Advertising

  2. Jav

    Guest

    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:
    > 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
     
    , Sep 4, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas Koch

    Enabling web sharing programmatically

    Thomas Koch, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    340
    Thomas Koch
    Jan 19, 2004
  2. =?Utf-8?B?RCBTaGVsZG9u?=

    Adding validation controls programmatically

    =?Utf-8?B?RCBTaGVsZG9u?=, May 11, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,788
    =?Utf-8?B?RCBTaGVsZG9u?=
    May 11, 2004
  3. Matthew Lock
    Replies:
    0
    Views:
    386
    Matthew Lock
    Aug 23, 2006
  4. Cappy2112
    Replies:
    0
    Views:
    473
    Cappy2112
    Jul 30, 2010
  5. Matthew Lock

    Programmatically Enabling HttpPost from ASP.NET

    Matthew Lock, Aug 23, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    199
    Matthew Lock
    Aug 23, 2006
Loading...

Share This Page