MVC3 - Passing data beyond the model to Partial view

后端 未结 4 434
天命终不由人
天命终不由人 2021-01-30 13:18

Is there a way to pass a piece of extra data along with a model to a Partial view?

E.G.

@Html.Partial(\"_SomeTable\", (List)ViewBag.Tabl

4条回答
  •  甜味超标
    2021-01-30 13:56

    You should be able to just put it in the ViewBag and then access it from the ViewBag in the partial view. See this SO answer.

提交回复
热议问题