Stage of a custom control's lifecycle that tag attributes are set

Discussion in 'ASP .Net' started by Helen, Oct 25, 2004.

  1. Helen

    Helen Guest

    I've got a set of custom dropdowns that know how to get their values
    from a datasource. I'm having problems loading the options before the
    selected option is set.

    I've got an abstract base class (VanillaDropdown) and various
    subclasses that load the data from various sources. I want the base
    class to automatically call the method the subclasses override to add
    their options.

    The code needs to be run after the child class' constructor has
    finished running, but before the selected value property is set. I've
    tried overriding init, but this seems to be too late.

    Does anyone have any insight into the way custom controls are created
    that could help me?

    Am I just doing this in the wrong way for ASP.NET? I don't really like
    the idea of having to do a databind in the code behind for every
    single dropdown on the site because we use them extensively. It just
    makes sense to me to be able to have a component that I can pop on a
    form that will display numbers between <start> and <finish>.
     
    Helen, Oct 25, 2004
    #1
    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. Frankie
    Replies:
    2
    Views:
    6,010
    Frankie
    Jun 23, 2005
  2. shruds
    Replies:
    1
    Views:
    871
    John C. Bollinger
    Jan 27, 2006
  3. Nonee
    Replies:
    7
    Views:
    685
    Nonee
    Oct 28, 2005
  4. Brian Folke Seaberg

    Initialization -- One Stage or Two Stage

    Brian Folke Seaberg, Jan 4, 2005, in forum: C++
    Replies:
    4
    Views:
    734
    Howard
    Jan 4, 2005
  5. P4trykx
    Replies:
    2
    Views:
    1,845
    bruce barker
    Jan 31, 2007
Loading...

Share This Page