0

Blank Dropdown with SkipLink in Dynamic Menu

The following is the code to create a dynamic menu binding with the sitemap:

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"  SiteMapProvider="ExampleSiteMap"/>
<asp:Menu ID="mainMenu" runat="server" Orientation="Horizontal"
DataSourceID="SiteMapDataSource1"
MaximumDynamicDisplayLevels="3">
</asp:Menu>
      <DynamicMenuStyle CssClass="dynamicMenu">  </DynamicMenuStyle>
     <DynamicMenuItemStyle CssClass="dynamicMenuItem"></DynamicMenuItemStyle>

During the testing of the code, there is a blank space before the menu and when the mouse hover over the blank space, there is a URL (http://127.0.0.1:8081/#ctl00_mainMenu_SkipLink) shows on the browser’s status bar:

After some googling work, I just realised it’s seems this usually happens in IE browser:

However, as for my case, it happens in both Firefox and Chrome browser. In order to fix the problem, I just need to add the SkipLinkText=”” in the code and the blank space is no longer exists on the menu:

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="ExampleSiteMap"/>
<asp:Menu ID="mainMenu" runat="server" Orientation="Horizontal"
DataSourceID="SiteMapDataSource1" SkipLinkText=""
MaximumDynamicDisplayLevels="3">
facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

chin yee

Leave a Reply

Your email address will not be published. Required fields are marked *

Current ye@r *

What is 11 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)