locked
Master Page issue RRS feed

  • Question

  • User1215529056 posted

    I had a site on an XP box for our intranet. Very basic.

    On the materpage I have this code for a small menu.

    When I moved it to Windows 7 Pro machine from XP the master page menu background became transparent.

    In debug in VS 2015 it looks good. I run dev on the actual server.

    I have images but not sure how to upload into this thread.

    I tested in Firefox, Chrome and IE and the new transparency is the same in all

    Any suggestions?

    Here's the code

    <asp:Menu ID="MasterMenu" runat="server" BackColor="#FFFBD6"
    DataSourceID="SiteMapDS" DynamicHorizontalOffset="2"
    Font-Names="Verdana" Font-Size="0.8em" ForeColor="#990000" Height="19px"
    StaticSubMenuIndent="10px" StaticDisplayLevels="3" >
    <StaticSelectedStyle BackColor="#FFCC66" />
    <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <DynamicHoverStyle BackColor="#990000" ForeColor="White" />
    <DynamicMenuStyle BackColor="#FFFBD6" />
    <DynamicSelectedStyle BackColor="#FFCC66" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <StaticHoverStyle BackColor="#990000" ForeColor="White" BorderStyle="Solid" />
    </asp:Menu>

    From any browser

    When running inside VS 2015

    To try to resolve the issue should I change the Web.sitemap file from this format

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="Default.aspx" title="Home" description="Home" >
    <siteMapNode url="http://10.0.0.231/wiki/projects" title="Neyenesch Wikis" description="9ish Wiki" />
    <siteMapNode url="Documents.aspx" title="Documents" description="9ish Documents" />
    <siteMapNode url="ISOProcedures.aspx" title="FSC Procedures" description="ISO/FSC Procedures" >

    <siteMapNode url="VendorsShow.aspx" title="Vendors" description="Vendors" >
    <siteMapNode url="VendorAdd.aspx" title="Add Vendor" description="Add Vendor" /></siteMapNode>
    <siteMapNode url="PhoneList.aspx" title="Cell Phone / Ext. List" description="Cell Phone / Ext. List" />

    <siteMapNode url="http://10.0.0.231/wiki/projects/nexpressjobcalendar/calendar" title="NexPress Calendar"></siteMapNode>
    <siteMapNode url="~\docs\Job_List.pdf" title="Prep Job List" description="Prep Job List"></siteMapNode>
    <siteMapNode url="JobLookUp.aspx" title="Job Process Lookup" description="Job Process Lookup"></siteMapNode>


    </siteMapNode>
    </siteMap>

    to this format:

    <?xml version="1.0" encoding="utf-8" ?>
    <Menus>
        <Menu Url="~/Home.aspx" Text="Home" Value="Home Page" />
        <Menu Url="javascript:;" Text="Services" Value="Services Page">
            <SubMenu Url ="~/Consulting.aspx" Text="Consulting" Value="Consulting Page"></SubMenu>
            <SubMenu Url ="~/Outsourcing.aspx" Text="Outsourcing" Value="Outsourcing Page"></SubMenu>
        </Menu>
        <Menu Url="~/About.aspx" Text="About" Value="About Us Page" />
        <Menu Url="~/Contact.aspx" Text="Contact" Value="Contact Us Page" />
    </Menus>
    Tuesday, May 7, 2019 10:10 PM

Answers

  • User288213138 posted

    Hi  RuthlessRoth,
     

    I tried running your code and found that the background color can be set directly through the style property <StaticMenuItemStyle> of the Menu control.

     

    The Result:


     
    Best Regard,
    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2019 5:35 AM

All replies

  • User288213138 posted

    Hi  RuthlessRoth,
     

    I tried running your code and found that the background color can be set directly through the style property <StaticMenuItemStyle> of the Menu control.

     

    The Result:


     
    Best Regard,
    Sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 8, 2019 5:35 AM
  • User1215529056 posted

    That did it. Thanks.

    Wednesday, May 8, 2019 4:21 PM