title: Render asp:menuitems as links
body: <p>I have a asp:menu define like so:</p>
  
  <pre><code>    &lt;div id="MenuContainer" runat="server" class="menuContainer"&gt;
          &lt;asp:Menu ID="DefaultMenu" runat="server" DataSourceID="SiteMapDataSource" SkinID="TopMenu" OnMenuItemDataBound="DefaultMenu_MenuItemDataBound" OnMenuItemClick="DefaultMenu_MenuItemClick" DynamicPopOutImageTextFormatString="" &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:SiteMapDataSource ID="SiteMapDataSource" runat="server" EnableViewState="False" ShowStartingNode="False" SiteMapProvider="WebserviceSiteMapProvider" /&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>The menu items are generated from a SiteMapDataSource as seen above. When rendered all the menu links are postbacks which then redirect to the relevant page:</p>
  
  <pre><code>protected void DefaultMenu_MenuItemClick(object sender, MenuEventArgs e)
          {
              Response.Redirect(e.Item.DataPath);
          }
  </code></pre>
  
  <p>Anyone know any easy way to render the menu items as hyper links rather than postbacks?</p>
  
  <p>I ask as this is adding an unnecessary round-trip to my application which on a specific customer set-up is causing performance issues. I've been searching around on the internet all morning for this and can't really see any obvious.</p>
  
  <p>Note: This is .Net 3.5 that is being used.</p>
  
  <p>If I'm missing something please just say.</p>
  
  <p>Nevermind, one of my colleagues showed me the issue, the sitemapdatasource was not returning a url therefore the links where being rendered as postbacks rather than hyperlinks.</p>