Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Master Page Page_Load not running
Message
From
21/08/2010 11:43:10
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
21/08/2010 09:22:33
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01477409
Message ID:
01477718
Views:
30
Frank, I just tested this. I put code in the page load of the outer master, the nested master, and the default content page. All three load events ran as I had a break point in all three. The default page load first, then the nested master, then the outer master. Here is something you need to verify.

Make sure that all of the masters are inherited from mmMasterPage and not from the standard master page. You would need to add some Mm using statements but they need to all be subclassed from mmMasterPage the same. Also, if that doesn't do the trick, then add something to all three load events even if they don't do anything so you can put a break point in every page load event.
Let me know what you find.
Tim

>>
>>This is the code I tried in my IASLeftNav.Master Page_Load that didn't run:
>>
>>
            if (Session["mmUserSecurity_UserPk"] != null)
>>            {
>>
>>                object UserPk = Session["mmUserSecurity_UserPk"];
>>
>>                DataSet dsUser = mmAppBase.SecurityMgr.oUser.GetUserByPK(UserPk);
>>                string userFirstName = "Not";
>>                string userLastName = "Logged In";
>>
>>                if (dsUser.Tables[0].Rows.Count > 0)
>>                {
>>                    userFirstName = dsUser.Tables[0].Rows[0]["FirstName"].ToString();
>>                    userLastName = dsUser.Tables[0].Rows[0]["LastName"].ToString();
>>                }
>>                this.lblCurrentUser.Text = userFirstName + " " + userLastName;
>>            }
>>
>>But it didn't matter what code was there, when stepping through the code the debugger never even went to the Page_Load for this master page.
>
>Thanks Frank,
>
>I have other solutions that are setup the same as yours. I will see if I can figure out what is going on.
>Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform