What are partial views in MVC?

By | June 8, 2017

Hi All,

Partial view is a reusable view which can be embedded inside other view.Like a user control it can be used in different areas of a page.
It can used with left menu, header and footer as shown in the image below.

Once the partial view is created we can call the partial view in the main view using
“Html.RenderPartial” method.

<body>
<div>
<% Html.RenderPartial("MyNewView"); %>
</div>
</body>

 

Leave a Reply

Your email address will not be published. Required fields are marked *