开发者

Passing model information to RenderPartial

Hi I have this line of code:

开发者_运维知识库

<% Html.RenderPartial("VenuesList"); %>

What I need to do is pass it my model via the additional parameters available in the overides. What do I write? My model is Venue. Thanks.


You could use the following overload allowing you to pass a model to the partial:

<% Html.RenderPartial("VenuesList", Model.SomeProperty); %>

or directly the model if it is of the correct type as expected by the partial:

<% Html.RenderPartial("VenuesList", Model); %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜