User:Sanjaypedia

How to : Create a Master Page for Web Site The process of adding a master page to a web application is similar to the process of ading a web forms.

To Add a New Master Page to the Web Site 1.In solution explorer,rigth-click the web site and then click Add New Item. 2.Under Visual studio installed templates,click Master Page. 3.In the Name box, type SiteMaster.Master. 4.In the Language box list, select your prefered programming language. 5.Click Add.

Designing the Master Page When you create new master page by using Microsoft Visual Studio 2005. it contains a single contntPlaceholder control.This control provides a location where content from referencing pages will be merged at run time.You can add additional contentPlaceholder controls to the master page. ContentPlaceholder controls are identified by their ID attributes--referencing pages will include content controls with attributes that map to the ContentPlaceholder control IDs on the master page. You can also add any HTML markup, HTML controls, and Web server controls to the page,although these user interface elements should be inserted outside of the contentPlaceholder controls. You can add server-side code to the master page; this code will run on all referencing pages at run time.