title: Cannot add controls to existing DIV element in my ASP page
body: <p>I'm trying to create a page where links are generated dynamically and added into existing <code>DIV</code> element in my <code>master</code>page. 
  Currently, I'm using <code>Html.ActionLink()</code> to display links, but I want to do it dynamically when the page loads.
  In my code behind, I cannot reference <code>menu</code> item to add links to it. Is there anything I'm missing?</p>
  
  <p>This is the fragment from my master page now.</p>
  
  <pre><code>&lt;div id="menu" runat="server"&gt;
    &lt;ul&gt;              
        &lt;li&gt;&lt;%: Html.ActionLink("Page1","Page1","Home") %&gt;&lt;/li&gt;
        &lt;li&gt;&lt;%: Html.ActionLink("Page2","Page2","Home") %&gt;&lt;/li&gt;
        &lt;li&gt;&lt;%: Html.ActionLink("Page3","Page3","Home") %&gt;&lt;/li&gt;
    &lt;/ul&gt;   
  &lt;/div&gt;
  </code></pre>
  
  <p>Right now, I'm just trying to come up with a basics so, I'm simply trying to get just one link displayed. Later on, I will want to replace all the <code>ActionLinks</code> to be generated from code behind.</p>
  
  <p>This is the part from my master.cs to generate just one link for now:</p>
  
  <pre><code>    String str = Url.Action("Page1", "Home");
      HyperLink hp = new HyperLink();
      hp.NavigateUrl = str;
      hp.Text = "Page1";
      menu.Controls.Add(hp);
  </code></pre>