Page_Load not loading in a page that has a master page and codebehind
Posted on 2007-11-27
I am using asp.net 2.
I have a login.aspx page that has a master page and uses codebehind.
If I put a Page_Load function within my login.aspx page without using codebehind, it works and runs the Page_Load. But if I move the PageLoad to the codebehind, it no longer runs the Page_Load.
I am using debug to step through and it totally does not hit it when I open a page. It does hit the Login1_LoggingIn function after I submit to log in, but not the Page_Load.
Here is what I have:
' there are no Imports....
Partial Class LoginClass
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
My login.aspx page has this in the @ Page directive:
Also, I have tried this with 3 other files with Page_Loads, different files, and none of them load the Page_Load in the codebehind.
I have also tried it with Page_PreInit