- By Penelope Coventry
Creating a Web Page from a Master Page
You can use several different methods to create an ASP.NET page within SharePoint Designer. However, because the page will be part of a SharePoint site, you will most likely want to keep the same navigation elements and look and feel as other pages. This is achieved by linking the content page with a master page. In Chapter 3, you created a new ASP.NET page by copying an existing page that is associated with a master page and then customizing it. In this chapter, you first created an ASP.NET page by using the browser, which again is automatically associated with a master page, and then in the previous exercise, you attached a master page to an ASP.NET page.
You can also create a content page from a master page. As we have seen in previous exercises, most customizations, Web Part zones, and Web Parts are stored within one or more content regions. When you create a content page from a master page, you can’t make any changes to the content regions. To make changes to the content, you must make the content regions editable.
In this exercise, you will create a content page from a master page and then make the PlaceHolderMain content region editable.
In the Folder List task pane, expand the _catalogs folder, and then expand the masterpage (Master Page Gallery) document library to display its contents.
The default.master file should appear.
Right-click default.master, and then click New from Master Page.
A new file, with a tab label of Untitled_1.aspx, appears in the document window. An asterisk to the right of the label name indicates that the page is not yet saved.
Right-click the untitled_1.aspx tab, and then click Save.
The Save As dialog box opens showing the teams.consolidatedmessenger.com site contents.
In the File name text box, type ShippingAdvice.aspx, and then click Save.
The tab is renamed to ShippingAdvice.aspx, and in the Folder List task pane, the file appears in the root of the site.
On the View menu, point to Toolbars, and then click Master Page to open the floating Master Page toolbar.
On the Master Page toolbar, click the Regions arrow, and then in the list, click PlaceHolderMain.
The PlaceHolderMain (Master) content region on the ShippingAdvice.aspx page is highlighted.
Close the Master Page toolbar.
Click the chevron to the right of the PlaceHolderMain content region, and in the Common Content Tasks list, click Create Custom Content.
The content region is renamed PlaceHolderMain (Custom), thereby making this content region editable. You can now insert text, Web Part zones, and Web Parts into this area of the ShippingAdvice.aspx content page.
Click the Save button.