Using RenderAction(actionname, values) in MVC4 issue

后端 未结 2 1675
醉酒成梦
醉酒成梦 2020-12-30 23:43

I need to display some child objects (Items) of an entity Request. Instead of Request I found it better to pass in a view that contains more info t

2条回答
  •  隐瞒了意图╮
    2020-12-31 00:23

    Usefully alternative:

    @model CAPS.RequestInfo
    ...    
    @Html.Action("Items", new { requestId = Model.Id })
    

    This code returns MvcHtmlString. Works with partialview and view result. Doesn't require {} chars.

提交回复
热议问题