Changing to a Master Page

Note: This topic applies only to the Web Forms Application presentation project types. Refer to Creating Web Forms Application Projects for more information.

An existing presentation project can be changed to use master pages. The best time to make this change is before any look-and-feel changes are made to the newly generated pages or before a project is built. However, the pages can be manually changed if look-and-feel changes have already been made to the pages.

Refer to Modifying the Master Page for information about master pages.

Changing to a Master Page

  1. In Solution Explorer, right-click the ClearPath ePortal data source project and click Presentation Generation Options....

  2. Select the presentation project, and click Modify.

  3. Select UseMasterPages and set to True. All new pages that are generated are based on a master page.

  4. Click OK.

  5. If a master page should be applied to dynamically generated pages in a T27 or UTS Web application project, do the following.

    1. In the Solution Explorer, right-click the newly created Web application project, and click ClearPath ePortal Application Configuration.

    2. On the Web tab, select Dynamic pages use master pages.

    3. Click Apply.

  6. If no look-and-feel changes have been made to the .aspx files after the pages were built, you can regenerate the files using the Generate Presentation Files dialog. If look-and-feel changes have been made to the .aspx files after the pages were built, the changes can be preserved by manually changing the pages. Make sure that each page has the following sequence of tags.

    <%@ Page Language="C#" MasterPageFile="~/Pages/MasterPage.master"
    AutoEventWireup="true" CodeFile="<yourpage.aspx.cs>" Inherits="<your page>"
    Title="<yourtitle" %>
    <%@ Register Assembly="Unisys.Common.AssociateControl"
    Namespace="Unisys.Common.AssociateControl" TagPrefix="ePortal" %>
    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ePortalContent" >
    <Your content goes here ....>
    </asp:Content>
  7. Right-click the presentation project, and click Build. Refer to Building Your ePortal Solutionfor more information. The .aspx pages now have the master page attached to them.

  8. Refer to Modifying the Master Page for information about populating the master page and content form template.