How to create one layout page for a partial view?
Simply in MVC we create _layout.html and configure in viewstart.html page for all view. But in this partial views case how I'll do?
If you know a good example, please provide it to me.
How to create one layout page for a partial view?
Simply in MVC we create _layout.html and configure in viewstart.html page for all view. But in this partial views case how I'll do?
If you know a good example, please provide it to me.
You can't create layout page for partialview because partialview is same as user control in asp.net.
As per your requirement you can create one @RenderSection() and consume for every partialview page.
As of I understand, you can't use a layout page for a partial view. The partial view is resides under a normal view and this view may have it's own layout page. No need of a layout page for the partial view.
If you decided to do so whatever the concept is: 1. Use a normal view to show the partial view. The normal view have no data except the partial view here. 2. Use your desired layout page for this normal view.