Page_Load not firing

Discussion in 'ASP .Net' started by Brad, Aug 20, 2003.

  1. Brad

    Brad Guest

    I have web user controls (ascx files) in multiple support assemblies; I'm
    building on a Commerce Server SDK sample. My problem is that the code
    behind Page_Load event is never getting called for the web user controls is
    one assembly though the Page_Init is fired. The Page_Load has the
    "Handles MyBase.Load" but still, when I step through the debugger the init
    sub works and the load is fired executed. In all the other support
    assemblies in the same solution the web user controls do work correctly.
    So why would the load not fire?


    #Region " Web Form Designer Generated Code "
    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    ....
    End Sub
    #End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    ...
    End Sub


    Thanks

    Brad
     
    Brad, Aug 20, 2003
    #1
    1. Advertisements

  2. Hi Brad,

    Is the method Page_Load not fired or it can't stop at a breakpoint in it?
    It is weird that this problem only occur with one web form. Is the web form
    different with others, for example, including any doubtful code or some
    components which is never used in other web form?

    Luke

    "Microsoft Security Announcement: Have you installed the patch for
    Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
    you to review the information at the following link regarding Microsoft
    Security Bulletin MS03-026
    http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
    visit Windows Update at http://windowsupdate.microsoft.com to install the
    patch. Running the SCAN program from the Windows Update site will help to
    insure you are current with all security patches, not just MS03-026."
     
    ¥xÆW·L³n§Þ³N³B¤ä´©³¡, Aug 21, 2003
    #2
    1. Advertisements

  3. Do you have the event wired up?

    this.Load += new System.EventHandler(this.Page_Load);
     
    Dino Chiesa [MSFT], Aug 21, 2003
    #3
  4. Brad

    Brad Guest

    I do, I'm using VB so using "Handles MyBase.Load.".....which again works
    fine in the other assemblies.
     
    Brad, Aug 21, 2003
    #4
  5. Brad

    Brad Guest

    Is the method Page_Load not fired or it can't stop at a breakpoint in it?
    Well, both...since it's not executing I can't step into it or hit a
    breakpoint on it. I know it's not executing as I'm not getting back any
    result from the load event processing...not even very simple results. It's
    not occuring in a web form.....it's in web user controls....and all the web
    user controls in one particular assembly (the forms are in the main web
    assembly and the controls in questions are in a support assembly).
     
    Brad, Aug 21, 2003
    #5
  6. Brad

    MSFT Guest

    Hi Brad

    Have you found the root cause for the problem?

    Thanks,

    Luke

    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    MSFT, Aug 27, 2003
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.