title: How to select a SiteMapNode from sitemap using code behind?
body: <p>I am busy working building my own custom navigation page in ASP.Net. I'm busy trying to fill an <code>&lt;asp:Repeater&gt;</code>'s data with a specific <code>SiteMapNode</code> from my <code>web.sitemap</code> file.</p>
  
  <p>Here is my <code>web.sitemap</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" &gt;
      &lt;siteMapNode roles="*"&gt;
          &lt;siteMapNode url="~/Secure/Home" title="Home"&gt;
              &lt;!-- Home SiteMapNodes --&gt;
          &lt;/siteMapNode&gt;
          &lt;/siteMapNode url="~/Secure/Maintenance title="maintenance"&gt;
              &lt;!-- Maintenance SiteMapNodes --&gt;
          &lt;/siteMapNode&gt;
      &lt;/siteMapNode&gt;
  &lt;/siteMap&gt;
  </code></pre>
  
  <p>In my Home navigation page I have the following repeater set up:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;asp:Repeater runat="server" ID="rptMenu" DataSourceID="smdsMain" OnItemDataBound="rptMenu_ItemDataBound"&gt;
          &lt;ItemTemplate&gt;
              &lt;li&gt;
                  &lt;a runat="server" href='&lt;%# Eval("url") %&gt;'&gt;
                      &lt;%# Eval("title") %&gt;
                  &lt;/a&gt;
              &lt;/li&gt;
          &lt;/ItemTemplate&gt;
      &lt;/asp:Repeater&gt;
  &lt;/ul&gt;
  &lt;asp:SiteMapDataSource ID="smdsMain" runat="server" ShowStartingNode="false" SiteMapProvider="XmlSiteMapProvider" /&gt;
  </code></pre>
  
  <p>I'm attempting to fill the <code>&lt;asp:Repeater&gt;</code> in the code behind using the <code>OnItemDataBound</code> method like this:</p>
  
  <pre><code>protected void rptMenu_ItemDataBound(object sender, RepeaterItemEventArgs e)
  {
      SiteMapNode homeNode = ???;
      ((Repeater)e.Item.FindControl("rptMenu")).DataSource = homeNode;
      ((Repeater)e.Item.FindControl("rptMenu")).DataBind();
  }
  </code></pre>
  
  <p>My only question is how to I set the <code>homeNode</code> <code>SiteMapNode</code> to the SiteMapNode with the <code>title</code> <code>home</code>?</p>