i've a table name Info. i want to create a partial view of this table of a strongly typed. my partial view in View/Shared is _InfoView.cshtl like:
@model IEnumerable<RealTest.Models.ifo>
<h2>_InfoView</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
name
</th>
<th>
address
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.name)
</td>
<td>
@Html.DisplayFor(modelItem => item.address)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.id }) |
@Html.ActionLink("Details", "Details", new { id=item.id }) |
@Html.ActionLink("Delete", "Delete", new { id=item.id })
</td>
</tr>
}
my View page is like: @model IEnumerable
@{
ViewBag.Title = "Index";
}
<p>
@Html.ActionLink("Create New", "Create")
</p>
@Html.Partial("_InfoView")
now i want to call it from another strongly typed view. when i called it it seems that it didn't get required data for partial view.now how i should pass partial view data???