Custom Execution Flow for Solution Sites
All custom aspects of the standard page execution flow occur within the routine Main. The Main routine is typically implemented as the first routine following include files on a Web site page. Helper routines that are specific to the page are typically found after the Main routine. Helper routines that are useful in a variety of pages are found in the utility routine include files.
The purpose of the Main routine, and its helper routines, is to establish the content to be displayed in a particular content area of the Web page being constructed. Both of the layout files template\layout1.asp and template\no_menu.asp assume that appropriate HTML content has been assigned as a string to the variable htmPageContent. The area of the page in which this content will be rendered is different in the two pages. In the file layout1.asp, the corresponding area is to the right of the menu area, and between the two horizontal rules (HR elements). In the file no_menu.asp, the corresponding area is the full width of the browser window, below the one horizontal rule.
The file layout1.asp also expects that a second content variable, htmDiscountBannerSlot, might also be assigned a string containing HTML content to be displayed in a full-width discount banner area below the second horizontal rule.
This is accomplished by setting two particular string variables to contain the HTML that will render the intended content. The layout files use the Internet Information Services (IIS) "<%=
" directive to write the contents of the content variables in the appropriate location within the page layout. For more information about these variables, see Page Layout Variables for Solution Sites.
In addition to establishing the HTML content to be assigned to the appropriate content variables, the routine Main and its subordinate routines need to perform other processing appropriate to the purpose of the page. Often, this involves interaction with one or more databases to retrieve information to be displayed and write new information to be saved (such as information about purchases being made).
The routine Main is also responsible for controlling access to the page by calling either EnsureAccess or EnsureAuthAccess before doing anything else.
See Also
Standard Execution Flow for Solution Sites
Copyright © 2005 Microsoft Corporation.
All rights reserved.