DEV Community

Cover image for What is a master page in ASP.NET?
narendra8989
narendra8989

Posted on

What is a master page in ASP.NET?

A master page is a special type of asp.net page that defines both the site-wide markup and the regions where associated content pages define their custom markup.

Master page are an important part of The Official Microsoft ASP.NET Site website. In a nutshell, a master page allows the page developer to define a website template, indicating what portions of the template are to remain fixed across pages that use the template and what regions of the template are customizable on a page-by-page basis. Having the site design and layout centralized in one (or more) master pages makes it easy to add new pages to the site that inherit the same look and feel and greatly simplifies changing the site design or adding or removing content that is common to all pages, such as content in the

element, footers, and references to CSS and JavaScript files

Master page with extension .master contains the layout of the which will remain the same through the postbacks,and only the content holder can be modified,changed or altered or contents of the page can be designed there apart from the basic layout of the page which is in masterpage .
Content pages are selected under masterpage.
Ways to create a master page,through Visual Studio10:-
1.open visual studio.
2.select Create website.
3.select website from the toolbar and click on Add new item.
4.select masterpage and edit your masterpage name.
5.click create and design your page Add content holders.
6.after creating your master layout.
7.select Add Content from website menu in Toolbar.
8.start creating your rest of the pages.

Apart From all this master pages have many functionality which are encountered in real time projects.

Meet The Experts For Better Explanations : https://nareshit.com/asp-net-mvc-online-training/

Top comments (0)