custom control?

Discussion in 'ASP .Net' started by ll, Nov 9, 2003.

  1. ll

    ll Guest

    I try to write a custom controls contain two dropdownbox..
    I have two questions here, please advice.
    1. Using ¡°Programmatic Composites¡±, the CreateChildControl method is called very early in the control¡¯s lifetime. Where is the place to initialize the value for the dropdownbox( for example, the selected index). I tried to put into the Page_Load() of the ASPX page, but Page_Load is fired after CreateChildControls?
    2. Using ¡°Render¡± way, I can see the event sequence is like this: ASPX Page_Load(initialize the value¡­) ¨C Control¡¯s ¡°Render¡±, but how to retrieve the dropdownbox¡¯s value?

    Thanks.
     
    ll, Nov 9, 2003
    #1
    1. Advertising

  2. ll

    Jj Guest

    Usually, you can put it in the OnInit() method. (If you are using VS.NET,
    the default OnInit() is collapsed in the designer block, you have to find
    it. )

    Jianjun


    "ll" <> wrote in message
    news:%23$...
    > I try to write a custom controls contain two dropdownbox..
    > I have two questions here, please advice.
    > 1. Using ¡°Programmatic Composites¡±, the CreateChildControl method is

    called very early in the control¡¯s lifetime. Where is the place to
    initialize the value for the dropdownbox( for example, the selected index).
    I tried to put into the Page_Load() of the ASPX page, but Page_Load is fired
    after CreateChildControls?
    > 2. Using ¡°Render¡± way, I can see the event sequence is like this: ASPX

    Page_Load(initialize the value¡­) ¨C Control¡¯s ¡°Render¡±, but how to
    retrieve the dropdownbox¡¯s value?
    >
    > Thanks.
    >
    >
     
    Jj, Nov 9, 2003
    #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. Replies:
    0
    Views:
    738
  2. Jonah Olsson
    Replies:
    1
    Views:
    599
    Scott Allen
    Apr 5, 2005
  3. J R M
    Replies:
    2
    Views:
    444
    Charlie@CBFC
    Jun 1, 2006
  4. Matt Sokol
    Replies:
    2
    Views:
    411
    Theo Tillotson
    Aug 7, 2003
  5. Jonah Olsson
    Replies:
    2
    Views:
    212
    Jonah Olsson
    Apr 5, 2005
Loading...

Share This Page