4 October 2005

Creating custom Controls

When you create a custom control, _do_not_ assign a namespace to the class that implements the control. Let it naked there, as follows:

using System.Configuration;
using System.Text;

/// Summary description for CustomFolderFiles.

public class CustomFolderFiles: Sitecore.ClientControls.ContentControl
#region Constants

Otherwise, when you try to register your class by defining a template field, Sitecore will concatenate the assembly name and the namespace and you'll have a hard time figuring out why you receive logged errors like

Could not find type in MainUtil.CreateObject: CustomFolderFiles


No comments: