Notes:
This topic applies to both the Web Forms Application presentation project types and Web Forms Mobile Application presentation project types. Refer to Creating Web Forms Application Projects and Creating Web Forms Mobile Application Projects.
Any changes made to the Web Form template affect only new pages that are generated. To apply changes to a project with existing .aspx pages, the existing .aspx files must be regenerated. Refer to Delete Presentation Files and Generate Presentation Files.
Deleting the .aspx file does not save changes made to any individual page. The Procedure below should be performed before you manually update your .aspx files. |
Characteristics of a Web Form Template
The top and bottom sections of each page have common information, but the template information can be modified on each page.
Procedure - Creating the Content of the Web Form Template
If a master page was not selected, a Web form template can be used to set basic look-and-feel characteristics for your presentation project.
In Solution Explorer, expand the presentation node, expand the Pages, Resources, PGT, and BT nodes, and then double-click the WebFormTemplate.aspx file.
Ensure that Design mode is selected. To change to design mode, click the Design button in the lower- left corner of the pane.
Use the Toolbox functionality of Visual Studio to add and modify the contents of the template.
Ensure that the following code is not changed: <ePortal : ePortalGeneratedContent ID="EPortalGeneratedContent1" runat="server" Text="ePortal Generated Content"></ePortal : ePortalGeneratedContent> |
Save the file.
If the Web form templates need to be used at run time, do the following:
In Solution Explorer, expand the presentation node, expand the Pages, Resources, PGT, and RT nodes, and then double-click the RuntimeWebFormTemplate.aspx file.
Repeat steps 2 through 4.