putting code in master page Page_Load event moves everything on the page down 2 lines?

  • Thread starter Thread starter Sunfire
  • Start date Start date
S

Sunfire

I put some code in the master page load event and find that for some reason,
all of the stuff on the page got moved down 2 lines. Is there any way to fix
this?
 
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;

}

}
 
Back
Top