Show navigation | Frontpage | Contact us | Sitemap

Embedding ASP.NET User Controls

To embed an ASP.NET User Control in Composite, simply copy the .ascx file to the web folder /UserControls and write the following in a template, page or plug-in output:

        $$USERCONTROL( Path=<path to .ascx file> );

The path to the .ascx file should be relative to the /UserControls folder. Only .ascx files placed in this folder (or sub folders) can be executed by Composite.

Examples:

  • $$USERCONTROL( Path=EventCalendar.ascx );
    This will load and display the User Control “/UserControls/EventCalendar.ascx”
  • $$USERCONTROL( Path=Forum/List.ascx );
    This will load and display the User Control “/UserControls/Forum/List.ascx”

If you specify additional parameters they get appended to the User Controls Attribute collection.

Installing the User Control

To deploy an ASP.NET User Controls in Composite just copy the .ascx file to the /UserControls folder. If your User Control require .NET assemblies (DLLs) simply copy them to the /bin folder, as you normally would.

My modules


© 2008 Composite A/S, Danmark
Tlf: +45 39 15 76 00 | info@composite.net
Composite A/S er Microsoft Certified Partner
Composite CMS overholder standarden for valid CSS
Composite CMS overholder standarden for valid XHTML 1.0
Printet fra http://www.composite.net/composite-1587.htm
Findes på denne sti: Composite Developer | 3.x technologies | ASP.NET | Embedding ASP.NET User Controls