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

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?
 
S

Sunfire

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;

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top