.ascx page_load event

Discussion in 'ASP .Net' started by MeDhanush, Jun 24, 2003.

  1. MeDhanush

    MeDhanush Guest

    Hi,

    I'm curious about the way user control .ascx gets access to the
    Page_Load event.
    As custom user control's inheritance is,
    Object
    ^
    |
    |
    Control
    ^
    |
    |
    TemplateControl
    ^
    |
    |
    UserControl
    ^
    |
    |
    CustomUserControl
    In this inheritance tree, there is no page object.
    So, does user control gets access to Page_Load event just by declaring
    in the web form Page ? Can sb pl clarify this for me ?

    TIA
    Kishore
     
    MeDhanush, Jun 24, 2003
    #1
    1. Advertising

  2. MeDhanush

    PJ Guest

    I'm not sure what you mean by getting access to the page load event. When a
    page parses the text in the aspx page, it creates an appropriate object for
    that control and gives a reference to that control w/ any variable that is
    declared in the page class that has the same name as the id
    attribute/property of the control. This happens in the AddParsedSubObject
    event before the Page_Load is run. Also, controls have a .Page property
    that is a reference to the page that they belong to.

    "MeDhanush" <> wrote in message
    news:...
    > Hi,
    >
    > I'm curious about the way user control .ascx gets access to the
    > Page_Load event.
    > As custom user control's inheritance is,
    > Object
    > ^
    > |
    > |
    > Control
    > ^
    > |
    > |
    > TemplateControl
    > ^
    > |
    > |
    > UserControl
    > ^
    > |
    > |
    > CustomUserControl
    > In this inheritance tree, there is no page object.
    > So, does user control gets access to Page_Load event just by declaring
    > in the web form Page ? Can sb pl clarify this for me ?
    >
    > TIA
    > Kishore
     
    PJ, Jun 25, 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. Quentin
    Replies:
    1
    Views:
    517
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    512
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,979
    Holger (David) Wagner
    Jul 3, 2004
  4. rockdale
    Replies:
    1
    Views:
    692
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  5. Joe
    Replies:
    1
    Views:
    410
    Jeffrey Tan[MSFT]
    Feb 16, 2004
Loading...

Share This Page