Error executing child request for handler in view

后端 未结 12 928
臣服心动
臣服心动 2020-12-09 02:30

I have an MVC 4 view where I render the following actions

@{
    Html.RenderAction(\"Index\", \"Logo\");
    Html.RenderAction(\"Index\", \"MainMenu\");
}
         


        
12条回答
  •  爱一瞬间的悲伤
    2020-12-09 03:15

    Ok I found the problem, hopefully this will help someone in future.

    The controllers for the partial views each contained the [HttpGet] attribute. For example

    [HttpGet]
    public ActionResult Index()
    {
    }
    

    I remove the attribute from both controllers

    public ActionResult Index()
    {
    }
    

    and everything is now working.

提交回复
热议问题