Whitebox in menucontrol
Im trying to use the asp.net menucontrol but sadly without any luck. Here is what I have done.
First i created a web.sitemap like this
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx开发者_如何学编程" title="qaz.dk" description="" roles="">
<siteMapNode url="" title="Links" description="" roles="">
<siteMapNode url="" title="Computer" description="" roles="">
<siteMapNode url="as.aspx" title="Antivirus + Spyware" description="" roles="" />
</siteMapNode>
<siteMapNode url="" title="Other" description="" roles="">
<siteMapNode url="http://www.stackoverflow.com" title="StackOverflow" description="" roles="" />
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>
Then I added the menucontrol to the masterpage and change some of the default values like this
<asp:Menu ID="MenuControl" Orientation="Horizontal"
runat="server" DataSourceID="SiteMapDataSource1" Font-Names="Courier New"
ForeColor="#413D3D" DynamicEnableDefaultPopOutImage="False"
DynamicHorizontalOffset="20" StaticDisplayLevels="1"
StaticEnableDefaultPopOutImage="False" >
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" StartingNodeOffset="0" />
The result looks like this alt text http://foto.qaz.dk/menu.jpg
I was expecting the 'Computer' and 'Other' menu items to be displayed The size of the whitebox depends on the number of menuitems.
When moving the mousepointer over the whitebox i doesnt expand.
The problem is am using ie8, so i added the following line to the head
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
精彩评论