title: ASP.NET MVC5 dynamic submenu with links generated from DB
body: <p>I need to have a submenu(Executive Sections) for a section called 'Executives'. This menu must show up when a user clicks Executives in the main menu and remain as long as any submenu link of Executives is clicked.
  Catch is: the submenu links are dynamic and come from the DB/CMS system, so it's not a hard-coded list. Which is where my woe begins.
  Currently, I have it in a PartialView that requires a model of IEnumerable so it can build dynamically.
  But how I go about making this work as I need it too is a little twisted up in my mind.</p>
  
  <pre><code>@using xxx.Models
  @model IEnumerable&lt;xxx.Models.ExecutiveSection&gt;
  &lt;ul class="nav navbar-nav"&gt;
  @foreach (ExecutiveSection es in Model)
  {
      &lt;li&gt;@Html.ActionLink(es.SectionName, "Section", "Executive", new { id = es.ExecutiveSectionId })&lt;/li&gt;
  }
  </code></pre>
  
  <p></p>