About UserControl components
A UserControl component is a container for a Web User Control that might or might not include a .NET assembly.
UserControl components are used to add custom user interface elements to forms. Mongoose supports these implementation options for developing user controls:
- To create a user control that functions in both the web client and the
Windows client, create a Web User Control. This type of User Control is essentially an
HTML page that is designed to function as part of the user interface. In this case, the
UserControl component functions as a container for the Web User Control, which is an
HTML page with its associated resources. Note: This is the only option we fully support at this time. The other options mentioned here are still supported for legacy user controls, but we do not encourage them for ongoing development.
This option is created by selecting the Use Web Control option in the Windows section of the Edit User Control Reference dialog box and supplying a Control URL for the control implementation in the Web section.
- (Deprecated) If the target platform is the Windows client only, you can create a Windows user control based on the .NET System.Windows.Forms.UserControl class. This component does not render or function if the form is opened in the web client.
- (Deprecated) If the target platform is the web client only, you can
create a web-based user control that works only in the web client. This is done by:
- Clearing all fields and options in the Windows section of the Edit Web User Control Reference dialog box.
- Specifying a Control URL in the Web section of the Edit Web User Control Reference dialog box; OR specifying a .NET assembly and an absolute or relative URL in that same section.
This component does not render or function if the form is opened in the Windows client.
- (Deprecated) Finally, you can create both a Windows user control assembly and a web user control, which causes the framework to render one or the other, depending on the client. In this case, you must provide both a Windows Assembly Name and a Control URL. This use case is rare.