title: MVC 3 Rendering 2-Level Menu as Partial View
body: <p>I would like to implement a 2-level parent/child menu in my MVC 3 site such as </p>
  
  <pre><code>Company
   - Background
   - Contact
  </code></pre>
  
  <p>I have implemented a single, parent level menu as a PartialView like so ...</p>
  
  <pre><code> &lt;div id="menu" class="block"&gt;
      &lt;ul id="menuItems"&gt;
          foreach (var item in Model)
          {
          &lt;li id="@item.Id"&gt;@Html.ActionLink(item.Name, item.Action,item.Controller)&lt;/li&gt;
          }
      &lt;/ul&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>and then included it on my MasterPage ...</p>
  
  <pre><code> @{Html.RenderAction("MainMenu", "Menu");}
  </code></pre>
  
  <p>The problem is that I would like to render a second child-menu based on the menu item selected at the parent level. This involves passing the Id of the parent into the controller action that returns the menu model. I'm not sure how I can pass this parent Id into the controller action. Can anyone provide any insights into this? I'm using MVC3 &amp; Razor.</p>