|
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.
|