Menu StaticSelectedStyle on Masterpage

Last post 04-11-2008 7:06 AM by moredotnet. 1 replies.

Sort Posts:

  • Menu StaticSelectedStyle on Masterpage

    04-11-2008, 5:44 AM
    • Member
      47 point Member
    • Hockeynut
    • Member since 10-17-2007, 8:31 AM
    • UK
    • Posts 69

    I'm using VS2005 with VB & Ajax 2.0.  I thought the StaticSelectedStyle property would work straight out of the bag, but appears not to be for me. 

    I'm using a master page with the menu on, it's just not doing it at all.  Can anyone help?

     

      The menu code in the Masterpage (using XML datasource as the sitemap):

    <asp:Menu ID="mnuMain" runat="server" Orientation="Horizontal" DataSourceID="MainMenuDataSource" SkinID="MainMenu">
    <DataBindings>
    <asp:MenuItemBinding DataMember="MainMenu" TextField="text" ValueField="text" NavigateUrlField="url" />
    </DataBindings>
    </asp:Menu>

     The skin for the Menu:
     

     <asp:Menu runat="server" SkinID=MainMenu Height="49px" Orientation="Horizontal"
                Width="100%" BackColor="#B5C7DE" Font-Names="Arial" Font-Size="10pt" 
    ForeColor="#284E98" StaticSubMenuIndent="10px">
    <StaticMenuItemStyle HorizontalPadding="20px" VerticalPadding="2px"
    BackColor="LightSteelBlue" BorderStyle="Outset" />
    <StaticSelectedStyle BackColor="Lavender" />
    <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
    <StaticSelectedStyle BackColor="#FFC080" />
    </asp:Menu>

      The menu sitemap XML source:
      

    <Home >
    <MainMenu text="Home" url="~/Default.aspx" description="Visit Basic Details"></MainMenu>
    <MainMenu text="Visits" url="~/VisitsMenu.aspx" description="Staff invloved in visit"></MainMenu>
    <MainMenu text="[Establishment]" url="~/Establishment.aspx"></MainMenu>
    <MainMenu text="Staff Details" url="~/Staff.aspx" description="Staff"></MainMenu>
    <MainMenu text="EVC's" url="~/EVC.aspx"></MainMenu>
    <MainMenu text="[Admin]" url="~/Admin.aspx"></MainMenu>
    <MainMenu text="[Reports]" url="~/Reports.aspx"></MainMenu>
    </Home>
     
  • Re: Menu StaticSelectedStyle on Masterpage

    04-11-2008, 7:06 AM
    Answer
    • Contributor
      4,221 point Contributor
    • moredotnet
    • Member since 11-24-2006, 7:07 AM
    • Millenium City
    • Posts 781
    Vishal Khanna



    ASP.NET|C#|AJAX|SQL|Design Patterns|Interview FAQs
Page 1 of 1 (2 items)