>>>Tim
>>
>>The problem I am having is with the nested master pages you created for me. I'm not sure if you have them lying around still, but this is the picture, maybe you could try it out .
>>
>>I have Default.aspx which has this in it:
>>
>>
< %@ Page Title="" Language="C#" MasterPageFile="~/IASLeftNav.Master" AutoEventWireup="true"
>> CodeBehind="Default.aspx.cs" Inherits="SamaanSystems.IAS.Web.CustomerManager" % >
>>
>>So Default uses IASLeftNav.Master as its master.
>>
>>IASLeftNav.Master has this in it:
>>
>>
< %@ Master Language="C#" MasterPageFile="~/IASOuter.Master" AutoEventWireup="false"
>> CodeBehind="IASLeftNav.master.cs" Inherits="SamaanSystems.IAS.Web.IASLeftNav" % >
>>
>>so it uses IASOuter.Master as its master.
>>
>>If I step through from the Default.aspx.cs's Page_Load, the IASLeftNav.Master.Page_Load never runs, but the Page_Load in the IASOuter.Master does run. I had thought that both would run so am trying to understand why the middle one is not running.
>
>
>I use nested masters on almost every ASP project so I can have different templates of design with the same outer heading and footer. I will use one of my projects to test your theory and see if I can give you and answer. I would like to know what code you are putting in the nested master page load event. That way I can test something similar to what you are trying to do.
>Thanks
>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.