Page_Load not firing

  • Thread starter Thread starter Brad
  • Start date Start date
B

Brad

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
 
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."
 
Do you have the event wired up?

this.Load += new System.EventHandler(this.Page_Load);
 
I do, I'm using VB so using "Handles MyBase.Load.".....which again works
fine in the other assemblies.
 
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).
 
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.)
 
Back
Top