.ascx page_load event

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default .ascx page_load event

    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 Guest

  2. Similar Questions and Discussions

    1. Call The Page_load Event
      Hi Dears I want to call the Page_load Event every 5 sec, how can I do that? I have no Ideia what I should do. I put in my web form the Timer...
    2. .ascx UserControl Properties are set after Page_Load only on PostBacks
      I wanted to have a hierarchical DataGrid so I created a User Control that has a DataGrid to act as the Child Grid. I put it inside a pageable...
    3. No Page_Load event when aspx is in iFrame?
      It might be me but... I dont seem to get a Page_Load event when a opening an ASPX in an iFrame. I do geta Page_Load event when an item on the...
    4. Access to Page_Load Event from the .ascx control
      UserControls have a page_load event as well as pages. when the Load event occurs for the page, the load events for all child controls are...
    5. Page_Load event doesn't appear in the trace
      Look at you "web generated code" section of the code behind file. Make sure in the IntializeComponents method there is something like this.Load...
  3. #2

    Default Re: .ascx page_load event

    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" <medhanush@yahoo.com> wrote in message
    news:15e9d0f4.0306241247.45e3cc7@posting.google.co m...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139