Building Reusable ASCX Panels and Components

One of the most powerful features of Iron Speed Designer is the ability to create and use reusable panels and components.  For example, a header, footer and menu panel can be included on every page of an application.  Reusable panels allow the definition of the panel in one place and pages simply refer to these panels.  Changes only need be made once to the panel and will be reflected on all pages that use the panel.  This allows you to consolidate the most common aspects of your application into one location and reuse them as often as necessary.

Reusable panels are simply fragments of a page and are generated as ASCX controls instead of ASPX pages.  Just like a page, they start with an HTML layout page file and are configured through the Page Properties dialog.  Once generated they are referred to by other HTML layout pages or panels by using the GEN:Use code generation tag.

Reusable panels can be either completely independent or they can be dependent on the page or panel that includes them.  For example, the header panel typically is a completely independent panel containing a logo, and other images.  However, while a reusable button panel specifies the layout, but the page or panel that incorporates the button specifies the actual button label, the action to take, and the URL to go to when the button is clicked.  The immediate parent provides any additional information needed by the dependent panel.  For example, the button label within a footer panel can only be specified at the footer panel level, but not at the page level.

Reusable panels can be nested as deeply as you like.  For example, a reusable button panel might be included in the reusable Footer panel that is included on each page.  There is no limitation on the number of levels of nesting.

Reusable panels also provide flexibility in naming.  The names of code generation tags used within a panel will not conflict with any names within the page or panel that uses them.  The names must be unique within a page or panel, but not across multiple pages or panels.

See Also

Building Independent Reusable ASCX Panels

Adding a Reusable ASCX Panel to a Page

Button Panels

Navigation Menu Panels (Menu Tabs)