Using the Editor's "Dynamic" Control

How the Editors / Dynamic ASCX control works.

One of the built-in controls called Dynamic that, when added to a PlaceHolder in a section, allows the developer to write the HTML that is rendered within the Options Modal for the specific control:section instance.

View the Demo

Checkout the demo for a detailed example

View Demo


Adding a Dynamic Control

A Dynamic Control can be added quickly to a canvasplaceholder via the dropdown.

Editing a basic Dynamic ASCX control

The control can contain any HTML, editable via the controls options. The content of the HTML is stored within the Date definition for the section. This does means that when you delete a dynamic control you also delete the HTML contained within.

If nessasary you can reference a dynamic assembly and use any publicly exposed functionality. Select the relevant assembly(s) from the list, include an import and make use within the ASCX content.

<% @import namespace="MyApp"%>

Selecting the WebPage

You can use any DataSource in the section by selecting it from the control options.

Loading & casting the WebPage from the DataSource

Having referenced a DataSource you can access the oDataItem and case it to the respective type and use any of it's properties.

Checkout the demo for a detailed example

View Demo

Image Edit