Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sudhakar104 reputationPosted Nov 28, 2017, 7:05 PM EST
In this article, we will learn:
What is Partial view in ASP.net MVC?
Partial view enables you to render a view inside the parent view. Partial View is similar to User Control in ASP.NET Web Forms.
The partial view is instantiated with its own copy of a ViewDataDictionary object which is available with the parent view so that partial view can access the data of the parent view. Any changes to this data does not cause a change in Parent view.
Advantages of Partial View in ASP.net MVC:
using Partial View in ASP.NET MVC has following advantages:
Example:
Let’s take an example to understand Partial view better.
<% Html.RenderPartial(“ReusablePartialView”); %>
Note: We need to ensure that Partial View exists in same folder as that of main view, otherwise, add the path for the partial view folder in RenderPartial function.
Now if we run our ASP.NET MVC application, content will be rendered at the bottom as shown below: