User Control Functions
Create and Use User Control Functions
The User Control functions allow you to create ASCX user controls and use them as regular CMS Functions.
In C1 CMS v 4.0 or later, User Control functions are an integral part of the system.
(If you want to create and use them earlier C1 CMS Versions, you can make use of the C1Contrib's User Control Functions.)
The User Control functions are available in C1 CMS for insertion on pages, templates, in other functions and in function calls in the CMS Console.
Note. To quickly create boilerplate-code User Control functions (as well as Master Page based templates) from Visual Studio 2012, install an ad-hoc Visual Studio 2012 extension by C1 CMS: CompositeC1WebFormExtensions.vsix. (It works with Visual Studio 2012 only.)
In this guide, you'll learn how to create, edit and use User Control functions.
- Creating User Control Functions
Learn how to create User Control functions in C1 CMS.
- Defining Parameters
Learn how to define parameters in User Control functions.
- Changing Widgets
Learn how to change widgets for User Control function parameters.
- Rendering URLs
Learn how to render Page URLs and Media URLs in User Control functions.
- Getting C1 CMS Data
Learn how to get CMS Data in User Control functions.
- Executing Other Functions
Learn how to execute other functions in User Control functions.
A few sample User Control functions to learn from.
- Advanced Setup
Learn how to change the root folder for your ascx/ascx.cs files (User Control functions) and do other advanced setup tasks.
- Getting Error Info
Learn how to get error information on User Control functions.
- Using asp:form
Learn how to properly use ASP.NET controls on pages and in XSLT-based page templates.
- Locating ASP.NET Controls
Learn how to locate ASP.NET controls on a CMS Page.
- Using ASP.NET AJAX Features
Learn how to use ASP.NET AJAX features in C1 CMS.
Learn how to use the built-in CAPTCHA functionality in C1 CMS on your ASP.NET Forms.
- Load User Control
Learn how to create and use a simple Web User Control on a web page with the LoadUserControl function.