Search code examples
asp.net-mvcasp.net-mvc-4partial-viewsasp.net-mvc-partialview

How can I create layout page for partial views in asp.net MVC?


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.


Solution

  • 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.