cannot implicitly convert type void to object. .NET MVC PartialViewResult

后端 未结 4 1155
逝去的感伤
逝去的感伤 2021-02-02 04:59

I have the following controller action:

[ChildActionOnly]
public virtual PartialViewResult ListActions(int id)
{
    var actions = meetingActionRepository.GetAll         


        
4条回答
  •  醉话见心
    2021-02-02 05:19

    I had the same issue. What worked for me is to encapsulate the expression it in curly brackets.

    @{Html.RenderPartial("viewName", Model);}

提交回复
热议问题