asp.net 2.0 master page asp:menu bug

Discussion in 'ASP .Net' started by tfsmag, Feb 22, 2006.

  1. tfsmag

    tfsmag Guest

    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.
    tfsmag, Feb 22, 2006
    #1
    1. Advertising

  2. tfsmag

    tfsmag Guest

    tfsmag, Feb 22, 2006
    #2
    1. Advertising

  3. tfsmag

    Henrik Guest

    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.
    >
    Henrik, Feb 22, 2006
    #3
  4. tfsmag

    tfsmag Guest

    yeah, i have a headache from spending the majority of the day trying to
    figure out wtf is going on :(
    tfsmag, Feb 23, 2006
    #4
  5. tfsmag

    Henrik Guest

    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" <>
    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.
    >
    Henrik, Feb 23, 2006
    #5
  6. tfsmag

    tfsmag Guest

    holy crap that worked... thanks!
    tfsmag, Feb 23, 2006
    #6
  7. tfsmag

    Guest

    Hey that works !!!! THANK YOU VERY MUCH !!
    , Mar 22, 2006
    #7
  8. tfsmag

    Guest

    DITTO That. Saved me hours and hours of work...


    wrote:
    > Hey that works !!!! THANK YOU VERY MUCH !!
    , Mar 30, 2006
    #8
  9. tfsmag

    gitanjali

    Joined:
    May 29, 2008
    Messages:
    1
    menu problem.


    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.
    gitanjali, May 30, 2008
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug McCann
    Replies:
    1
    Views:
    993
    William Brogden
    Aug 5, 2004
  2. Zeba
    Replies:
    1
    Views:
    480
    Mark Rae
    Feb 22, 2007
  3. Luqman
    Replies:
    1
    Views:
    825
    Luqman
    Mar 13, 2007
  4. Nathan Sokalski
    Replies:
    25
    Views:
    1,407
    Nathan Sokalski
    Mar 4, 2010
  5. SerpentKiss2010
    Replies:
    0
    Views:
    2,470
    SerpentKiss2010
    Apr 6, 2011
Loading...

Share This Page