Nested master page in ASP.Net Web Application

Introduction

In this post, I explain how to Create and Use nested master page in ASP.Net Web Application.

What is Master Page ? Master pages are one of my favorite features within .NET. By design, they provide a single location for common layouts that are used across a set of web pages and allow common updates to occur in one place.

You will see in most of the website every page has the same content at the top and bottom of the page. In this place, we can use the master page.So, What is nested master page? It's A child master page of a master page and has its own content placeholders of its own to display content supplied by its own child pages.When will we use it? Sometimes we need to create a web application where all the pages have the same header and footer but a different structure in the main content area.

Like : -

One Column Main content Area

Two Column Main content Area

Here I am going to design 2 web pages where both contain same Header and footer but different structure in main content area
Where are the steps for this...

Step-5: Add a Nested Master Page (For Two Columns Pages).

Go to Solution Explorer > Right Click on Project under solution explorer > Add > New item > Select Nested Master Page under web> Enter Name > Select Master Page > Add.
Here I have named NestedMasterPage1.Master
Here we will add 2 ContentPlaceHolder as I have already said Nested Master Page has its own ContentPlaceHolder.