Refrence Link: link
At view:
<div>
<table id="tableDetails">
<tr>
<td rowspan="6">
@Html.Partial("RestaurentAddressPartial", new DiningTable.Models.Address{ Id = 1, Flat = "D-1033", Steet1 = "Devi Homes", Steet2 = "Near Hafeezpet petrol Pump", ZipCode = "500049", City = "Hyderabad" })
</td>
<td rowspan="6">
@Html.Partial("RestaurentAddressPartial", new DiningTable.Models.Address { Id = 1, Flat = "D-1034", Steet1 = "Devi Homes", Steet2 = "Near Hafeezpet petrol Pump", ZipCode = "500049", City = "Hyderabad" })
</td>
</tr>
</table>
</div>
At Partial view:
@model DiningTable.Models.Address
<h4>Address:</h4>
<p>
@Html.DisplayFor(m => m.Flat)<br />
@Html.DisplayFor(m => m.Steet1)<br />
@Html.DisplayFor(m => m.Steet2)<br />
@Html.DisplayFor(m => m.City)<br />
@Html.DisplayFor(m => m.ZipCode)<br />
</p>
OutPut:
No comments:
Post a Comment