Configure Page Directives

Go to:

Layout Editor, Property Sheet, Page directives...

You can place ASP.NET directives in pages via the Page Directives dialog (Property Sheet, Page section, Page directives), either globally for all your application’s pages by placing them in your application’s master pages or in an individual page.

@Register directives can occur anywhere in your page as long as they are placed before the first use of a tag prefix:

For example, you may have an existing web page header and footer, which were developed using Visual Studio .NET as web user controls.  By way of example, insert the following into the Page Prologue (Right-click, Page Directives…):

<%@ Register TagPrefix="MyControl" TagName="Header" Src="/MyApp/Shared/Header.ascx" %>


<%@ Register TagPrefix="MyControl TagName="Footer" Src="/MyApp/Shared/Footer.ascx" %>

Where the header to be inserted is:





and the footer to be inserted is:





Register directives and code generation tags

The TagName for all ASCX Register directives is based on the Name of the ASCX component/class (e.g. Button), and not the name attribute of the GEN:Use tag (e.g. OKButton).  The name attribute of a GEN:Use tag is used to derive the ID attribute of the ASP.NET server control tag that will replace the GEN:Use tag, but not the directive and not the TagPrefix or TagName of the server control tag.

Several caveats apply:

Registering custom controls created with Iron Speed Designer

You don’t have to register any controls created by Iron Speed Designer in pages also created by Iron Speed Designer; Iron Speed Designer does this for you automatically.  However, you may wish to use custom controls created by Iron Speed Designer on pages that were not created by Iron Speed Designer, such as hand-created pages on your website or another application not created by Iron Speed Designer.

To use controls created by Iron Speed Designer in other web pages, you must register them properly on those ASPX web pages.  Here is an example of a control registration directive:

<%@ Register Tagprefix="MyApp4" TagName="Button" Src="../Shared/Button.ascx" %>

This is how the control should be used within the ASPX page.

<MyApp4:Button runat="server" id="OrdersSearchButton" Button-CausesValidation="False" Button-CommandName="Search" Button-Consumers="OrdersSearchArea" Button-Text="Go">


Example: Automatically Refresh Page on Periodic Basis

You can easily cause a web page to automatically refresh on a periodic basis.

Place the following in your page’s prologue section via the Page Directives dialog to refresh the page every 5 seconds:

<meta http-equiv="refresh" content="5">


Example: Adding Application-Wide HTML Tags via Master Pages

You can add application-wide HTML tags to your application’s master pages.  These master page files are used as the basis for most of your application’s web pages.  This approach saves you from manually adding them to every page in your application.  Your application’s master pages are located the Master Pages folder, e.g.:

...\MyApp\Master Pages\HorizontalMenu.master

Step 1:  Locate the master page file, e.g.:

...\MyApp\Master Pages\HorizontalMenu.master

Step 2:  In Layout Editor, open the Page Directives dialog (Property Sheet, Page section, Page Directives…).

Step 3:  Add your ‘application-wide’ tags in the HTML’s <head> section of the master page file via the Page Directives dialog, e.g.:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">

<head id="Head1" runat="server">

<title> </title>

<meta name="keywords" content="My Keywords">

<meta name="description" content="My Description">

<link rel="stylesheet" rev="stylesheet" type="text/css" href="../Styles/Styles.css"/>


Step 4:  Rebuild your application (Build, Rebuild All).

The new tags will be included on every page that references the updated master page.