Thursday, February 28, 2008

ASP.Net Master Page for Consistant look and feel for websites

In this blog we will take up the Master page.
Start a new Asp.Net 2.0 project.
Go to solution explorer and delete Default.aspx. Go to Web Site menu select Master Page.
Master page resembles an ordinary web page except that it contains a content place holder.

Go to the design view.

In the case of my master page I am going to give a consitent header and footer. So keeping the content place holder intact I added the header and footer.

Now add a new Asp.Net page. There will be an option called select maste page. Check that option and click Add.

The Select Master Page dialog will appear as shown in the exibit.

Select the master page and Click OK.

You will get the page as shown in the exibit. You can type the page specific data inside the content place holder.

Like wise you can add rest of the Asp.Net pages and select the master page for consistent look and feel.

Related Blogs

Asp.Net 2.0 Master Page and TreeView
Themes in Asp .Net

No comments:

Post a Comment