I have a controller which returns a list of object, i need to display it to a partialview. So what I want is that the partial view inside the non partial view will accept the result and not the non partial view.
This is the "NON" partial view named "Index"
My table headers are here:
<tbody>
@Html.RenderPartial()
Action("DashboardSearchResult","Dashboard",new { List<ReservationType> reservationList})
</tbody>
This is my partial view named "_Dashboard"
@model IEnumerable<HotelOrganization.Models.ReservationType>
@foreach (var item in Model)
{
<tr>
<td>@Html.DisplayFor(modelItem => item.ReservationId)</td>
<td>@Html.DisplayFor(modelItem => item.ReservationStartDate)</td>
<tr>
This is my controller:
public PartialViewResult DashboardSearchResult(List<ReservationType>reservationList)
{
return PartialView("~/Views/Shared/_Dashboard", reservationList);
}