Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > putting code in master page Page_Load event moves everything on the page down 2 lines?

Reply
Thread Tools

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

 
 
Sunfire
Guest
Posts: n/a
 
      11-05-2007
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?



 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      11-05-2007
Depends on what you put in the page load event - - can you show us what you
put in there?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Sunfire" <> wrote in message
news:%23DiOYA%...
>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?
>
>
>



 
Reply With Quote
 
 
 
 
Sunfire
Guest
Posts: n/a
 
      11-05-2007
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;

}

}





"David Wier" <> wrote in message
news:%23PkCSL%...
> Depends on what you put in the page load event - - can you show us what
> you put in there?
>
> David Wier
> http://aspnet101.com
> http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
> no bloated markup
>
>
> "Sunfire" <> wrote in message
> news:%23DiOYA%...
>>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?
>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not Quite Everything for a Theory of Everything fitz VOIP 0 02-28-2010 04:42 PM
Materpage page_load event fired after content page_load? rockdale ASP .Net 1 11-16-2006 06:59 PM
Having a problem using WebRequest inside code invoked by the Page_Load event to to download a page located on same server (as the currently executing page). Hasani \(remove nospam from address\) ASP .Net 9 09-29-2004 05:07 PM
Difference between putting code in constructor and putting code in static{} Saurabh Java 6 05-30-2004 02:44 PM
Help, mouse moves, sticks for a few seconds, then moves... what's up? unbroken Computer Information 8 01-19-2004 04:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57