Populer Topics

Master Page In Asp .Net

A Master Page enables to shall the some content among multiple contains page in a website.We can use a Master Page to create a common layout for page. If we want all pages in our website to shall three column layouts than we can create the layout in master page and create the layout to multiple contain page.

We can use Master Page to display common content in multiple page for example if we want to display a standard header and footer in each page in our website than we can create standard header and footer in master page.

Creating A Master Page

We create a Master Page in visual web developer by selecting a website menu, option, add new item and select Master Page.The Master Page contains two special things.

  1. <%@ Master %>
  2. Contain Place Holder Control

<%@ Master %> : This is a directive instead of the normal page directive.

Contain Place Holder : The Master Page looks very much like a normal Asp .Net page. We can place all most all the same element in a master page that we could place an Asp .Net page including HTML, server side script and asp.Net control.