ASP.NET MVC 3 Partial View in layout page

后端 未结 4 684
情歌与酒
情歌与酒 2021-01-04 11:53

I\'m working on setting up a shared content (navigation) for an asp.net MVC layout page.

Here is my partial view \"_LayoutPartial.cshtml\" with code to pull navigati

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 12:24

    I have solved this error getting on Layout page

    System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper
    

    Important ! First create partial view inside shared folder

    In Controller ,

    public PartialViewResult Userdetails()
    {
       ....
       return PartialView("PartialViewName", obj);  
    }
    

    In Layout Page,

    @{Html.RenderAction("action","controller");}
    

提交回复
热议问题