Steps to create Master Page
Right-click your web project in the Solution Explorer window
Select Add New Item.
Select the Master Page item type from the Add New Item dialog.
Right-click your web project in the Solution Explorer window
Select Add New Item.
Select the Master Page item type from the Add New Item dialog.
Following is an example of Master Page and a Content Page.
This is simple HTML page that serves template for other pages.
The @ Master directive at the top of the page defines that the page is Master Page.
A placeholder tag is overridden by the content page to place the content.
You can have many placeholders tag each of them with different id.
The @ Master directive at the top of the page defines that the page is Master Page.
A placeholder tag
You can have many placeholders tag each of them with different id.
Content Page Example
%@ Page MasterPageFile="master1.master" %>
%@ Page MasterPageFile="master1.master" %>
ASP Interview Questions
When you request this page, ASP.NET merges layout specified in the Master Page and content of content page to produce page result.

0 Comments:
Post a Comment