title: Unexpected Rendering of Menu Control
body: <p>i have created navigation menu which gets its data from sitemap source but when opening it from any client rather than the server,i found that it doesn't render correctly and added extra node like this :</p>
  
  <pre><code>&lt;a class="level1 staticMenuItemStyle static" href="#" onclick="__doPostBack('ctl00$NavigationMenu','')" tabindex="-1"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>here my code snippet :</p>
  
  <pre><code>//sitemap file
      &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" &gt;
    &lt;siteMapNode&gt;
      &lt;siteMapNode url="~/home.aspx" title="Home" description="Home" accesskey="H" /&gt;
      &lt;siteMapNode url="~/MemberPages/PLCInfoPage.aspx" title="Resource Info"
                     description="ResourceInfo" accesskey="P" /&gt;
        &lt;siteMapNode url="~/MemberPages/RequestReservation.aspx" title="Request Reservation"
                       description="RequestReservation" accesskey="E" /&gt;
        &lt;siteMapNode url="~/MemberPages/ExtendReservationPage.aspx" title="Extend Reservation"
                       description="ExtendReservation" accesskey="E" /&gt;
        &lt;siteMapNode url="~/MemberPages/InitiateSession.aspx" title="Initiate Session"
                   description="InitiateSession" accesskey="N"/&gt;
  
        &lt;siteMapNode url="~/MemberPages/SearchPage.aspx" title="Search"
                 description="SearchPage" accesskey="U"/&gt;
  
      &lt;siteMapNode url="~/AdminPages/AdminHome.aspx" title="Admin"
                 description="Administration" requiresResourceType="Admin" accesskey="U"&gt;
        &lt;siteMapNode url="~/AdminPages/ManagAdmiistrators.aspx" title="Manage Accounts"
                    description="Manage Accounts"
                    accesskey="S" /&gt;
        &lt;siteMapNode url="~/AdminPages/ResourcePropertiesPage.aspx" title="Manage Resource Properities"
                    description="Manage Resource Properities"
                    accesskey="B" /&gt;
        &lt;siteMapNode url="~/AdminPages/ManageLocations.aspx" title="Manage Locations and Labs"
                 description="Manage Locations and Labs"
                 accesskey="B" /&gt;
        &lt;siteMapNode url="~/AdminPages/PLCManagepage.aspx" title="Manage Resources"
                   description="Manage Resources"
                   accesskey="B" /&gt;
        &lt;siteMapNode url="~/AdminPages/CheckReservations.aspx" title="Check Reservations"
                     description="Check Reservations"
                     accesskey="B" /&gt;
        &lt;siteMapNode url="~/MemberPages/feedbackReport.aspx" title="Show feedback"
                       description="Show feedback"
                       accesskey="B" /&gt;
        &lt;siteMapNode url="~/AdminPages/messagesPage.aspx" title="Add Messages"
                       description="Add Messages"
                       accesskey="B" /&gt;
      &lt;/siteMapNode&gt;
      &lt;siteMapNode url="~~/Help.aspx" title="Help"
                       description="Help"
                       accesskey="B" /&gt;
    &lt;/siteMapNode&gt;
  &lt;/siteMap&gt;
  </code></pre>
  
  <p>//snippet from master page where menu exists</p>
  
  <pre><code>          &lt;div class="clear hideSkiplink"&gt;   
                 &lt;asp:menu id="NavigationMenu"   CssClass="menu" 
          staticdisplaylevels="2" DynamicHorizontalOffset="1"
          staticsubmenuindent="1px" MaximumDynamicDisplayLevels="4"
          orientation="Horizontal" 
          IncludeStyleBlock="False" 
          datasourceid="MenuSource"    
          runat="server" Height="30px" onmenuitemdatabound="NavigationMenu_MenuItemDataBound"&gt;
  
          &lt;staticmenuitemstyle ItemSpacing="40" CssClass="staticMenuItemStyle"/&gt;
          &lt;statichoverstyle CssClass="staticHoverStyle" /&gt;
          &lt;StaticSelectedStyle CssClass="staticMenuItemSelectedStyle"/&gt; 
          &lt;DynamicMenuItemStyle CssClass="dynamicMenuItemStyle" /&gt;      
          &lt;dynamichoverstyle CssClass="menuItemMouseOver" /&gt;
          &lt;DynamicMenuStyle CssClass="menuItem" /&gt;
          &lt;DynamicSelectedStyle CssClass="menuItemSelected" /&gt;
  
          &lt;DataBindings&gt;        
               &lt;asp:MenuItemBinding DataMember="siteMapNode" 
                  NavigateUrlField="url" TextField="title"  
                      ToolTipField="description" /&gt;
          &lt;/DataBindings&gt;
        &lt;/asp:menu&gt;
         &lt;asp:TreeView ID="NavigationTreeView" runat="server" Visible="False" 
          DataSourceID="MenuSource" /&gt;
  &lt;div id="e"&gt;
          &lt;asp:Label ID="lblMapPath" runat="server" Text="You are here:"&gt;&lt;/asp:Label&gt;
          &lt;asp:SiteMapPath ID="SiteMapPath2" runat="server" 
                  RenderCurrentNodeAsLink="true" 
                  CssClass="currentNodeStyle"
              PathSeparator=" &gt;&gt; "&gt;
              &lt;PathSeparatorStyle ForeColor="#5D7B9D" CssClass="currentNodeStyle" /&gt;
              &lt;CurrentNodeStyle ForeColor="#333333" CssClass="currentNodeStyle" /&gt;
              &lt;NodeStyle ForeColor="#7C6F57"  CssClass="currentNodeStyle"  /&gt;
              &lt;RootNodeStyle  ForeColor="#5D7B9D" CssClass="currentNodeStyle"  /&gt;
      &lt;/asp:SiteMapPath&gt; 
          &lt;asp:SiteMapDataSource ID="MenuSource" runat="server" ShowStartingNode="true" 
              StartFromCurrentNode="false" /&gt;
  &lt;/div&gt;    
  </code></pre>
  
  <p>//style sheet used</p>
  
  <pre><code>div.hideSkiplink
  {
      background-color: #C3D603;
      width: 100%;
  }
  
  div.menu
  {
      padding: 4px 0px 4px 8px;
  }
  
  div.menu ul
  {
      list-style: none;
      margin: 0px;
      padding: 0px;
      width: auto;
  }
  
  div.menu ul li a, div.menu ul li a:visited
  {
      background-color: #C3D603;
      border: 1px solid #E4E4E4;
      color: #666666;
      display: block;
      line-height: 1.35em;
      padding: 4px 20px;
      text-decoration: none;
      white-space: nowrap;
      font-weight: normal;
  }
  
  div.menu ul li a:hover
  {
      background-color: #bfcbd6;
      color: #465c71;
      text-decoration: none;
  }
  
  div.menu ul li a:active
  {
      background-color: #465c71;
      color: #cfdbe6;
      text-decoration: none;
  }
  </code></pre>