Example: Adding Custom ASCX Controls

You can incorporate custom ASCX controls into any Iron Speed Designer web page by adding two lines into the page directives via the Page Directives dialog (Property Sheet, Page section…).

Step 1:  In the Page Directives dialog, place this @Register tag in the page prologue before the DOCTYPE statement.

<%@ Register Tagprefix="MyApp1" TagName="MyCustomASCX" Src="../MyDir/MyCustomASCX.ascx" %>

TagPrefix can be any name, but is typically the application name.

TagName can be any name, but is typically the name of the control you are trying to include.

Src is the path to the ASCX control file.  It can use ~ to refer to the root folder of the application, e.g.:

~/Customers/MyCustomASCX.ascx

Step 2:  Add the ASCX control to your page in the appropriate cell via the HTML Editor, e.g.:

<MyApp1:MyCustomASCX runat="server" id="id37"></MyApp1:MyCustomASCX>

The form of the tag is typically:

<TAGPREFIX:TAGNAME id="YourID" runat="server"></TAGPREFIX:TAGNAME>

In the example above, the TAGPREFIX is MyApp1 and the TAGNAME is MyCustomASCX.

Step 3:  Build and run your application.

See Also

HTML Editor