How did you create a partial view and consume it?

Answer

When you add a view to your project you need to check the “Create partial view” check box.

Figure: Create partial view

Once the partial view is created you can then call the partial view in the main view using the Html.RenderPartial method as shown in the below code snippet:

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

All asp.net-mvc Questions

Ask your interview questions on asp-net-mvc

Write Your comment or Questions if you want the answers on asp-net-mvc from asp-net-mvc Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---