I'm trying to bring in my menu.
In my _Layout.cshtml page I have
<div class="wrapper">
                <!-- Navigation -->
                  @Html.RenderAction("Navigation", "Nav")
The Nav Controller looks like this
public ActionResult Navigation()
{
    var pages = pageRepository.Pages;
    return View(pages);
}
The Navigation View Looks like this
@model IEnumerable<Site.Domain.Entities.Page>
@{
    Layout = null;
    List<Site.Domain.Entities.Page> pages = new List<Site.Domain.Entities.Page>();
    foreach(var page in Model)
    {
        pages.Add(page);
    }
}
@foreach (var link in Model)
{
    if (link.ParentPage == "Home")
    { 
    <li>@link.PageTitle</li>
    <ul>
        @foreach (var subLink in pages)
        {
            if (subLink.ParentPage == link.PageTitle)
            { 
            <li>@subLink.PageTitle</li>
            }
        }
    </ul> 
    }
}
The view works fine when I go to .../nav/navigation
What I'm trying to do is bring this into my _Layout page so that I can use it as my menu.
I continue to get an error with @Html.RenderAction("Navigation", "Nav")
The error says "The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments"
Should I be using this as a partial? What is the best way to go about this? Thanks for any advice!
 
     
     
    