hi!
define event in masterpage and handle it in content pages calling BuildPage methods:
*.master.cs:
public event EventHandler SessionVarsChanged;
protected void MenuItemClick(object sender, MenuEventArgs e)
{
Country = null;
Language = null;
e.Item.Selected = true;
switch (((Menu)sender).SelectedItem.Value)
{
case "technicalDataSheets": Session["action"] = Actions.tds;
break;
case "safetyDataSheets": Session["action"] = Actions.tds;
break;
default:
break;
}
if (SessionVarsChanged != null)
SessionVarsChanged(this, EventArgs.Empty);
}
in content pages:
protected override void OnLoad(EventArgs e)
{
(Master as MyMasterPageType).SessionVarsChanged += new EventHandler(SessionVarsChangedHandler);
}
void SessionVarsChangedHandler(object sender, EventArgs e)
{
BuildPage();
}
or use Server.Transfer() to "reload" whole page.
orzeh
code less, think more!