Adding a Reusable ASCX Panel to a Page

The panel is now ready to be included in a page.  To include this panel on a page:

Step 1:  Create a simple layout page file that includes the reusable panel.  The reusable panel is specified by using the GEN:Use code generation tag.  The File attribute of this tag specifies the panel to use.  The file name specifies the location of the file including the directory.  If no directory is specified, it is assumed to be in the same directory as the page that is including this panel.

<GEN:Use Name="Header" File="HeaderPanel.html"/>

this is the rest of the page

Step 2:  In the page’s Properties dialog, select the Header code generation tag and change the Type of the tag to a Header.  At this point you can also override the layout page file and point to a different file if desired.  This allows you the flexibility of overriding the panel to point to a different panel.

Tag Property

Setting

Code generation tag

Header

Type

Header

Step 3:  Build and run the application and view the generated page.

See Also

Building Independent Reusable ASCX Panels

Adding a Reusable ASCX Panel to a Page

Button Panels

Navigation Menu Panels (Menu Tabs)