Using Frames, Directives and Meta-Tags in Layout Pages
The best place to place site-wide Meta Tags so that you don't have to manually edit every single page is to place them in the Header panel that is included at the top of every page. This panel is an ASCX control that is included in every page of your application.
- Alan Fisher, Chairman of Iron Speed, Inc.

August 9, 2005
Iron Speed Designer V3.0
Using Frames in Layout Pages
Frames and IFrames are useful for simultaneously displaying the results (responses) of multiple HTTP requests in the same browser window. You can use Frames, IFrames, and popup windows, in your applications. However, please be aware of these technical issues:
  • Using Frames and IFrames in any .NET page complicates post-backs because each Frame's document contains a separate HTML Form.
  • Inter-frame interaction is possible on the client side using Javascript, but the .NET convention, which Iron Speed Designer follows, is to use server side code whenever possible.
  • Inter-frame interaction is not possible on the server side because:
    • HTTP requests from Frames are indistinguishable from regular Requests.
    • Frame Requests are processed individually, often sequentially (but possibly simultaneously), and in possibly arbitrary order.

    Because of these limitations, using Frames and IFrames can affect the server side session history mechanism and cause buttons which redirect "Back" to behave in an undesired manner.

  • A Request from a given Frame can only affect another Frame by emitting Javascript within its own Response to effect client side interaction, and / or by server side caching (assuming the affected Request is processed after the affecting Request) and special code within both pages.
Placing ASP.NET Directives in Pages

You can place ASP.NET directives in layout page files by inserting @Register directives at the very beginning of the file. The @Register directives can occur anywhere in layout page files as long as they are placed before the first use of a tag prefix, i.e., they must precede the tag in the file, before the first use of a tag prefix. This allows you to freely mix ASP.NET controls in layout pages by following this simple rule.

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 layout page file before the tag:

Where the header to be inserted is:

and the footer to be inserted is:

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 generated 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:

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

Customizing HTTP Headers, Bodies, and Other Page Sections

You can add custom page headers and other web page elements to your application’s web pages by adding HTML to the pages’ , and other sections. Do this by inserting HTML into the appropriate web page section. For example, the following HTML causes the page to refresh itself automatically every 2 minutes (120 seconds).

All pages created by Iron Speed Designer have page properties that correspond to these page sections, and their contents can be specified programmatically from the page's safe class.

Procedure

This example shows how to add a tag to page by setting the tag in the Load method of the safe class of a single page.

Step 1: Locate and open the page’s safe class, e.g.:

Step 2: Add code to the page's Load handler that creates a Literal control. Then, specify the text to be included in the header or other section and add the new Literal control to the page's Head1 object.

Step 3: Build and run the application. The specified text will now appear in the page's HEAD container, and the page will refresh automatically every 120 seconds.

Another approach allows you to modify the headers across the entire application by modifying the Load method in the CustomBasePage class. This class is in the hierarchy for each page of the application.

Please note that the Head1 variable used above is defined in the Generated page class; you will not have direct access to it in the CustomBasePage class using Me.Head1. Instead, you will need to do something like:

Adding Site Wide Meta-Tags Via Page Headers
The best place to place site-wide Meta Tags so that you don't have to manually edit every single page is to place them in the Header panel that is included at the top of every page. The Header panel contains the logo for the application. This panel is an ASCX control that is included in every page of your application (as long as you used the pages automatically created by the Application Wizard or created them from the templates provided with Iron Speed Designer).

Procedure

Step 1: Go to the Application Explorer, expand the Header & Footer folder, and select Header.ascx.

Step 2: Select the HTML tab and add your meta tags after the GEN:Template line.

Step 3: Rebuild your application with the Build, Rebuild All command. The site-wide meta-tags will be included on every page of your application.

About the Author
Alan S. Fisher
Co-Founder and Chairman of Iron Speed, Inc.

Mr. Fisher was a General Partner at Outlook Ventures, Inc., a venture capital company prior to co-founding Iron Speed, Inc. He co-founded Onsale, Inc. (now Egghead.com) and was its Chief Technology Officer from July 1994 to December 1999. He also Co-founded and was President of Software Partners, Inc, a developer and publisher of software products from August 1988 to July 1994. From April 1984 to August 1988, Mr. Fisher served as Technical Marketing Manager and Product Development Manager for Teknowledge, Inc., a developer of artificial intelligence software products. From June 1981 to April 1984, he served as a member of the technical staff for AT&T Bell Laboratories. Mr. Fisher serves on the Board of Directors of Infodata Systems Inc. (NASDAQ:INFD) an e-business consulting services company; He formerly served on the board of a number of companies including Onsale, Inc. (later Egghead.com and now Amazon.com), and FatBrain, Inc. an Internet retailer of technical and professional books.

Mr. Fisher received his B.S. in Electrical Engineering from the University of Missouri and received his M.S. in Electrical Engineering from Stanford University.



  Privacy Statement