Page_Load called more than once for user control - newbie question

Discussion in 'ASP .Net Building Controls' started by keith, Nov 5, 2004.

  1. keith

    keith Guest

    Hi,

    I have a page with a user control as header, which in turn has a user
    control drop down list.

    When I run the page in debug with a break on the page load events for the
    page, on the header control, and the drop down list.

    I hit the breaks in this order
    1) Page
    2) Header
    3) Header
    4) Drop down

    For both hits on the Header, IsPostBack is false.

    I would have guessed that having the sub-user control drop down was causing
    the second firing of the Page_Load in the header, but as it's Page_Load
    occurs afterwards, I just don't know.

    I looked at my page to see if there were 2 references to the Header, but in
    the Html there is only the register statement and the one that places it on
    the page.

    There is also a dim protected with events for it in the code behind.

    It's not a big problem, but when I tried to add a second user control to the
    Header, it would crash after the second Page_Load, with the dissassembly
    showing nop and a blank second column, which I assume means a null pointer.

    Any enlightenment, or even pointing to an appropriate web page would be
    welcome.
    keith, Nov 5, 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. googler
    Replies:
    4
    Views:
    512
  2. Vinod I
    Replies:
    3
    Views:
    436
    Kelly Leahy
    Jan 16, 2004
  3. Gancy
    Replies:
    4
    Views:
    174
    Rasto Levrinc
    Feb 3, 2005
  4. John Gordon
    Replies:
    1
    Views:
    80
    John Gordon
    May 21, 2013
  5. Ethan Furman

    Re: @staticmethods called more than once

    Ethan Furman, May 21, 2013, in forum: Python
    Replies:
    1
    Views:
    78
    88888 Dihedral
    May 22, 2013
Loading...

Share This Page