I am looking for some help with an Ektron problem.
The scenario is that we have a number of widgets which sit on a number of pages. These widgets all take user input. As the user moves through the pages filling out the form we save their field responses into a session state object, these get written to a database later.
When the user gets to the end of the form we want to display all the widgets that they have filled out in a read-only mode. This will act as a summary page.
We can easily set each input control on a widget to be read-only by way of a query string parameter or CMS editable field. We can also load the user responses back into the widget from session state.
What we are having an issue with is loading the CMS edited content back into the widget.
Is there a way that we can reload a previously viewed widget? Maybe by an id using the Ektron API?
We have played around with the WidgetBase.Host object but haven’t been able to make it work. We have also tried saving a whole widget object in to session state and reloading it onto another page but this hasn’t worked also.
In your code,
using Ektron.Cms.PageBuilder;using Ektron.Cms.Widget;Now you can add
myWidgetto your page.If you want to read its properties. First you need your widget’s type. In your ASPX page, you can use
<%@ Reference Control="~/widgets/YourWidget.ascx" %>Then in your code-beside file you can reference the control’s type aswidgets_YourWidget. You can type cast myWidget aswidgets_YourWidget