Is this really the version you are looking for? Kentico Xperience 8.1 Documentation is no longer updated. Use the switcher in the header to choose your product version.
By preparing custom classes that inherit from an appropriate base class, you can extend the functionality of Kentico. This approach allows you to implement the following types of objects:
If you create the custom classes in your project's App_Code folder (or CMSApp_AppCode -> Old_App_Code on web application installations), you do not need to integrate a new assembly into the web project. Code in the App_Code folder is compiled dynamically and automatically referenced in all other parts of the system.
To ensure that the system can load custom classes placed in App_Code, you need to register each class.
using CMS;
// Ensures that the system loads an instance of 'CustomClass' when the 'MyClassName' class name is requested.
[assembly: RegisterCustomClass("MyClassName", typeof(CustomClass))]
...
public class CustomClass
{
...
}The RegisterCustomClass attribute accepts two parameters:
Once you have registered your custom classes, you can use them as the source for objects in the system. When assigning App_Code classes to objects in the administration interface, fill in the following values: