title: The Controls collection cannot be modified error when using asp Menu control
body: <p>So here is my problem:
  I have a webpage that is using an asp:TreeView control and a sitemap to draw a menu.</p>
  
  <pre><code>&lt;asp:TreeView ID="CatalogTreeViewControl" runat="server" DataSourceID="dsSiteMap"&gt;
  &lt;/asp:TreeView&gt;
  &lt;asp:SiteMapDataSource runat="server" ID="dsSiteMap" ShowStartingNode="False" SiteMapProvider="MyXmlSiteMapProvider"/&gt;
  </code></pre>
  
  <p>This works like a charm, but I want to use the asp:Menu control instead of the TreeView, så I do this:</p>
  
  <pre><code>&lt;asp:TreeView ID="CatalogTreeViewControl" runat="server" DataSourceID="dsSiteMap" Visible="False"&gt;
  &lt;/asp:TreeView&gt;
  
  &lt;asp:Menu ID="Menu1" runat="server" DataSourceID="dsSiteMap"&gt;&lt;/asp:Menu&gt;
  
  &lt;asp:SiteMapDataSource runat="server" ID="dsSiteMap" ShowStartingNode="False" SiteMapProvider="MyXmlSiteMapProvider"/&gt;
  </code></pre>
  
  <p>But this results in the following error:</p>
  
  <blockquote>
    <p>The Controls collection cannot be modified because the control contains code blocks (i.e. &lt;% ... %>). </p>
  </blockquote>
  
  <p>What am I doing wrong here? </p>