How do I add third party components such as a textbox to my form and have it interact with WorkflowGen?

Issue

How do I add a third-party component such as a textbox to my form and have it interact with WorkflowGen?

Background

The WorkflowGen library only supports standard .NET objects (see the WorkflowGen Web Forms for Visual Studio Developer Guide for a complete list). In order to use a third-party component, manual control and data mapping are required to allow WorkflowGen to recognize the object and carry its value.

Solution

First, you need to add a reference in your project to the third-party DLL, which will give you the ability to add the specific component to your web form.

Since WorkflowGen does not have native support for third-party components, there is no direct way to control the properties of the third-party component using WorkflowGen parameters such as FORM_FIELDS_READONLY or FORM_FIELDS_REQUIRED. You will need to manually control their visibility by setting the Enable or Visible properties, and then set up your own required validation in code-behind.

You can access the value of a third party control by adding a hidden .NET textbox (Visible = false) to keep the value from the original component transferred over during the submit process. For example, during the event trigger of the third-party component or even during the submit event of the form, you would add the value from the third party component field to the hidden textbox.