What I need to do is pass...">

Passing Model Information to RenderPartial

Hi, I have this line of code:

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

What I need to do is pass it to my model using additional parameters available in overides. What I am writing? My model is this place. Thank.

+5
source share
1 answer

You can use the following overload so that you can pass the model in partial:

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

or directly the model, if it has the correct type, is expected to be partial:

<% Html.RenderPartial("VenuesList", Model); %>
+11
source

All Articles