How about post your full code of the page? I inserted your portion of the code you gave and I got the submenus to appear. Maybe you have some type of CSS defined that is overriding your display?
Please remember to click Mark as Answer if my post was helpful.
zhgart
Member
13 Points
69 Posts
Where are sub Menu?
Jan 30, 2013 05:41 AM|LINK
I set up the second level menu, but when browse in IE8, there is nothing but an empt box, what's wrong?
urenjoy
Star
12377 Points
1862 Posts
Re: Where are sub Menu?
Jan 30, 2013 05:55 AM|LINK
Press F12 and inspect the submenu code and check the applied CSS. You can change it to get it working.
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Jan 30, 2013 12:35 PM|LINK
<asp:Menu ID="Menu1" runat="server" BackColor="#FFFBD6" DisappearAfter="10000" DynamicHorizontalOffset="2" Font-Names="Times New Roman" Font-Overline="False" Font-Size="1.2em" ForeColor="Blue" Orientation="Horizontal" StaticSubMenuIndent="10px" Width="144px"> <StaticSelectedStyle BackColor="#FFCC66" /> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#990000" ForeColor="White" /> <DynamicMenuStyle BackColor="#FFFF99" /> <DynamicItemTemplate> <%# Eval("Text") %> </DynamicItemTemplate> <DynamicSelectedStyle BackColor="#FFCC66" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <StaticHoverStyle BackColor="#990000" ForeColor="White" /> <Items> <asp:MenuItem Text="Files" Value="Files"> <asp:MenuItem NavigateUrl="~/Home.aspx" Text="Open" Value="Open"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/About.aspx" Text="New" Value="New"></asp:MenuItem> <asp:MenuItem Text="Save" Value="Save"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="Edit" Value="Edit"></asp:MenuItem> <asp:MenuItem Text="Widows" Value="Widows"> <asp:MenuItem NavigateUrl="~/About.aspx" Text="About" Value="About"> </asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu>zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Jan 30, 2013 12:36 PM|LINK
btw, how to insert a image?
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Jan 31, 2013 06:24 AM|LINK
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Jan 31, 2013 11:46 AM|LINK
it seems microsoft refuse to occupy their space to adopt pics.
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Feb 01, 2013 02:36 AM|LINK
another shown
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Feb 01, 2013 02:40 PM|LINK
waiting......
imchaz
Member
350 Points
360 Posts
Re: Where are sub Menu?
Feb 01, 2013 08:19 PM|LINK
How about post your full code of the page? I inserted your portion of the code you gave and I got the submenus to appear. Maybe you have some type of CSS defined that is overriding your display?
zhgart
Member
13 Points
69 Posts
Re: Where are sub Menu?
Feb 02, 2013 01:10 AM|LINK
Here they are,
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage1.master.cs" Inherits="MasterPage1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> <style type="text/css"> .style1 { width: 100%; border: 2px solid #0000FF; } .style2 { width: 100%; height: 85px; border: 1px solid #00FFFF; background-color: #00FF00; } .style3 { width: 188px; } .style4 { width: 373px; } .style5 { width: 439px; } </style> </head> <body bgcolor="#ffff99"> <form id="form1" runat="server"> <div style="height: 124px; width: 917px; margin-top: 0px;"> <table bgcolor="#CCFF33" class="style2"> <tr> <td class="style3"> This is table</td> <td class="style4"> <asp:Menu ID="Menu1" runat="server" BackColor="#FFFBD6" DisappearAfter="10000" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Overline="False" Font-Size="Medium" ForeColor="#990000" Orientation="Horizontal" StaticSubMenuIndent="10px" Width="330px" Height="52px" style="margin-left: 0px"> <StaticSelectedStyle BackColor="#FFCC66" /> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#990000" ForeColor="White" /> <DynamicMenuStyle BackColor="#FFFBD6" /> <DynamicItemTemplate> <%# Eval("Text") %> </DynamicItemTemplate> <DynamicSelectedStyle BackColor="#FFCC66" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <StaticHoverStyle BackColor="#990000" ForeColor="White" /> <Items> <asp:MenuItem Text="Files" Value="Files"> <asp:MenuItem NavigateUrl="~/Home.aspx" Text="Open" Value="Open"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/About.aspx" Text="New" Value="New"></asp:MenuItem> <asp:MenuItem Text="Save" Value="Save"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="Edit" Value="Edit" NavigateUrl="~/Default.aspx"></asp:MenuItem> <asp:MenuItem Text="Widows" Value="Widows"> <asp:MenuItem NavigateUrl="~/About.aspx" Text="About" Value="About"> </asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu> </td> <td> </td> </tr> </table> <br /> what is this?<br /> and line<br /> outof<br /> <br /> how</div> <p> <p> holderHead <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> <p> </p> <p> <br /> </p> </asp:ContentPlaceHolder> <table cellpadding="2" cellspacing="3" class="style1"> <tr> <td bgcolor="#CCFF99"> table1</td> <td class="style5"> second</td> </tr> <tr> <td> </td> <td class="style5"> </td> </tr> <tr> <td> third line</td> <td bgcolor="#CCFF99" class="style5"> table 6</td> </tr> </table> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" StartingNodeUrl="~/Home.aspx" /> <p> <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" Width="192px"> <Nodes> <asp:TreeNode Text="新建Files" Value="新建Files"> <asp:TreeNode NavigateUrl="~/Home.aspx" Text="新建open" Value="新建open"> </asp:TreeNode> <asp:TreeNode NavigateUrl="~/About.aspx" Text="新建Save" Value="新建Save"> </asp:TreeNode> </asp:TreeNode> <asp:TreeNode Text="新建Edit" Value="新建Edit"></asp:TreeNode> <asp:TreeNode NavigateUrl="~/About.aspx" Text="新建Help" Value="新建Help"> </asp:TreeNode> </Nodes> </asp:TreeView> </p> <asp:TreeView ID="TreeView2" runat="server" DataSourceID="SiteMapDataSource1" ImageSet="Contacts" NodeIndent="10"> <ParentNodeStyle Font-Bold="True" ForeColor="#5555DD" /> <HoverNodeStyle Font-Underline="False" /> <SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px" VerticalPadding="0px" /> <DataBindings> <asp:TreeNodeBinding DataMember="SiteMapNode" /> <asp:TreeNodeBinding DataMember="SiteMapNode2" TextField="Url" /> </DataBindings> <NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" /> </asp:TreeView> <br /> <br /> </form> </body> </html>