|
1 | 1 | # render-partialview-with-model
|
| 2 | + |
2 | 3 | This article explains how you can render a partial view in the main view with model data.
|
| 4 | + |
| 5 | +You can render Partial View using **Html.RenderAction** and **Html.RenderPartial** helper methods. |
| 6 | + |
| 7 | +## Files |
| 8 | + |
| 9 | +1. **[Order Model](https://github.com/geeksarray/render-partialview-with-model/blob/master/RenderPartialViewWithModel/Models/Order.cs)** - Order Model with IEnumerable<OrderLineItem> |
| 10 | + |
| 11 | +1. **[Order Line item Model](https://github.com/geeksarray/render-partialview-with-model/blob/master/RenderPartialViewWithModel/Models/OrderLineItem.cs)** - Order line item entity with properties like OrderID, ProductID etOrder HTML View with Modelc.https://github.com/geeksarray/render-partialview-with-model/blob/master/RenderPartialViewWithModel/Views/Order/GetOrder.cshtml |
| 12 | + |
| 13 | +1. **[Order HTML View with Model](https://github.com/geeksarray/render-partialview-with-model/blob/master/RenderPartialViewWithModel/Views/Order/GetOrder.cshtml)** - to show Order Model data on view. |
| 14 | + |
| 15 | + Order Partial View will be shown as below image |
| 16 | + |
| 17 | +  |
| 18 | + |
| 19 | + For more detailed description visit - [ASP.NET MVC Partial View with Model](https://geeksarray.com/blog/render-partialview-with-model) |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
0 commit comments