Publishing Choices and Types Shared by Several DTCs

If the DTCs in your project each publish the same or related choices, you can use their DesignTimeControlSet property to reference a DTC object that handles the shared publishing. This DTC class that you create only publishes the choices and specifies relationships between types. It does not have a user interface.

When you create the class, you can publish static and dynamic choices in the same manner as other DTCs. For example, to publish static choices, specify them in the site property of the class. To publish dynamic choices, specify them in the OnGetChoices method. The OnRebind method is the only method that will be called on this class.

Without this class, each DTC would have to repeat the same publishing information. With this class, those DTCs can reference the class's ProgId in the DesignTimeControlSet property. When the DTC is added to a page, the choices published by the class are automatically added and published.