Return to doc.sitecore.com

3.  Define a Class
Prev Next
  1. Set class name. For example CustomChecklist;
  2. Specify base class name for CustomChecklist – in our case it is Sitecore.Web.UI.HtmlControls.Control.
    There are two possible ways you can go:
    1. Derive from the Sitecore.Web.UI.HtmlControls.Control class and store all parts of the composite inside of your class.
    2. Derive from the ‘main’ control (say, checklist) and add the other parts.

      In present article we follow the former approach.
       
  3. Specify the constructor of your control. Here you can set the CssClass and other properties. For example:

    public CustomChecklist()
    {
    this.Class = "scContentControl";
    base.Activation = true;
    }

Prev Next