Here is my page_load event in full:
protected void Page_Load(object sender, EventArgs e)
{
//get the file name so we can test for its existance.
String PageName = Path.GetFileName(Request.FilePath);
switch (PageName)
{
case "index.aspx":
MainMenu.Items[0].Enabled = false;
break;
case "AboutUs.aspx":
MainMenu.Items[1].Enabled = false;
break;
case "InHim.aspx":
MainMenu.Items[2].Enabled=false;
break;
case "OnlineCommunity.aspx":
MainMenu.Items[3].Enabled=false;
break;
case "Links.aspx":
MainMenu.Items[5].Enabled=false;
break;
case "Events.aspx":
MainMenu.Items[6].Enabled=false;
break;
case "ContactUs.aspx":
MainMenu.Items[7].Enabled=false;
break;
}
}