Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > asp.net 2.0 master page asp:menu bug

Reply
Thread Tools

asp.net 2.0 master page asp:menu bug

 
 
tfsmag
Guest
Posts: n/a
 
      02-22-2006
Has anyone had a problem with putting a menu control into a master page
in .net 2.0? I have a problem where if i just drop a menu control on a
regular page the menu works fine, the submenus work perfect. But if I
put that exact same code inside a master page, when i go to view one of
the files that use that master page, all of the submenus are out of
wack and instead of being hidden, they are at the bottom of the menu,
and only go back in if i rollover the parent menu item. Any insight
into this would be appreciated.

 
Reply With Quote
 
 
 
 
tfsmag
Guest
Posts: n/a
 
      02-22-2006
here is a screenshot of what it's doing when i try to put it anywhere
in a master page

http://test.ccmsi.com/losscontrol/jt_test/menu_bug.jpg

 
Reply With Quote
 
 
 
 
Henrik
Guest
Posts: n/a
 
      02-22-2006
I have the same behaviour, but only when the pages are viewed in IE.
They render just fine in Firefox.

I have not figured out what is causing it yet.

tfsmag wrote:

> Has anyone had a problem with putting a menu control into a master page
> in .net 2.0? I have a problem where if i just drop a menu control on a
> regular page the menu works fine, the submenus work perfect. But if I
> put that exact same code inside a master page, when i go to view one of
> the files that use that master page, all of the submenus are out of
> wack and instead of being hidden, they are at the bottom of the menu,
> and only go back in if i rollover the parent menu item. Any insight
> into this would be appreciated.
>

 
Reply With Quote
 
tfsmag
Guest
Posts: n/a
 
      02-23-2006
yeah, i have a headache from spending the majority of the day trying to
figure out wtf is going on

 
Reply With Quote
 
Henrik
Guest
Posts: n/a
 
      02-23-2006
I found this (and it works)

> A lot of users are finding that after moving their ASP.NET 1.1 site to ASP.NET 2.0 and then adding a Menu Control to their app, the Menu doesn't work.
>
> The reason this doesn't work is that an extra tag was added to web.config <xhtmlConformance mode="Legacy" /> This flag was meant for 2.0 to act a lot more like 1.1 and one of the major differences is the naming convention of controls. This naming change causes the quirky behavior with Menu in IE.
>
> There are 2 fixes for this issue:
>
> 1) Remove the xhtmlConformance tag from web.config
> Personally if you can do it, I recommend this option. If you're using ASP.NET 2.0 features, you should try and stick with the new rendering modes.
>
> 2) If you can't do #1, then give your masterpage an ID
> To do this, add a line to your Page_Load for your Masterpage:
>
> public partial class MasterPage : System.Web.UI.MasterPage
> {
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ID = "Master1";
> }
> }




-------- Original Message --------
From: "tfsmag" <(E-Mail Removed)>
To:
Subject: asp.net 2.0 master page asp:menu bug
Date: 2/22/2006 2:46 PM

> Has anyone had a problem with putting a menu control into a master page
> in .net 2.0? I have a problem where if i just drop a menu control on a
> regular page the menu works fine, the submenus work perfect. But if I
> put that exact same code inside a master page, when i go to view one of
> the files that use that master page, all of the submenus are out of
> wack and instead of being hidden, they are at the bottom of the menu,
> and only go back in if i rollover the parent menu item. Any insight
> into this would be appreciated.
>

 
Reply With Quote
 
tfsmag
Guest
Posts: n/a
 
      02-23-2006
holy crap that worked... thanks!

 
Reply With Quote
 
piyushsoni@gmail.com
Guest
Posts: n/a
 
      03-22-2006
Hey that works !!!! THANK YOU VERY MUCH !!

 
Reply With Quote
 
terry@terryanderson.net
Guest
Posts: n/a
 
      03-30-2006
DITTO That. Saved me hours and hours of work...


http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hey that works !!!! THANK YOU VERY MUCH !!


 
Reply With Quote
 
gitanjali gitanjali is offline
Junior Member
Join Date: May 2008
Posts: 1
 
      05-30-2008
Quote:
Originally Posted by Henrik
I found this (and it works)

> A lot of users are finding that after moving their ASP.NET 1.1 site to ASP.NET 2.0 and then adding a Menu Control to their app, the Menu doesn't work.
>
> The reason this doesn't work is that an extra tag was added to web.config <xhtmlConformance mode="Legacy" /> This flag was meant for 2.0 to act a lot more like 1.1 and one of the major differences is the naming convention of controls. This naming change causes the quirky behavior with Menu in IE.
>
> There are 2 fixes for this issue:
>
> 1) Remove the xhtmlConformance tag from web.config
> Personally if you can do it, I recommend this option. If you're using ASP.NET 2.0 features, you should try and stick with the new rendering modes.
>
> 2) If you can't do #1, then give your masterpage an ID
> To do this, add a line to your Page_Load for your Masterpage:
>
> public partial class MasterPage : System.Web.UI.MasterPage
> {
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ID = "Master1";
> }
> }




-------- Original Message --------
From: "tfsmag" <(E-Mail Removed)>
To:
Subject: asp.net 2.0 master page asp:menu bug
Date: 2/22/2006 2:46 PM

> Has anyone had a problem with putting a menu control into a master page
> in .net 2.0? I have a problem where if i just drop a menu control on a
> regular page the menu works fine, the submenus work perfect. But if I
> put that exact same code inside a master page, when i go to view one of
> the files that use that master page, all of the submenus are out of
> wack and instead of being hidden, they are at the bottom of the menu,
> and only go back in if i rollover the parent menu item. Any insight
> into this would be appreciated.
>

I am new to asp.net 2.0.
I faced the same menu problem with master pages.
IF I set id for master page in page load it works ok. But I am getting error for gridview control in content page as 'Index out of range. Must be non-negative ....' when i user rowediting event.

Please let me know any solution.
 
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
How to Access Master Page Controls from page.aspx doesn't inherit from master SerpentKiss2010 ASP .Net 0 04-06-2011 02:46 PM
Setting the value of a Master page's control's property using a property of the Master page Nathan Sokalski ASP .Net 25 03-04-2010 03:42 AM
Can a master page be built from another master page Zeba ASP .Net 1 02-22-2007 10:55 AM
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments