Return to

2.  Configuration

XML Controls are configured in the web.config. It is possible to configure the file folders, assembly references and using statements.





Defines using statements that are included in the interim C# file.


Defines the assemblies to reference in the compilation step.


Defines the file directories to look for XML Controls and assemblies where web controls may appear.


An entry in the control sources section can have the following attributes:





If mode is “off”, the entry is ignored.


Defines the namespace of the webcontrols in this source.


The file directory.


An assembly that contains webcontrols.


Defines that subfolders should be included, if the source is a directory.


If specified, controls in the XML Control must have this namespace.


Control sources are searched in the sequence that is specified in the web.config. If two XML Controls have the same name, the control that occurs in the first control source is used and the other ignored. This allows XML Controls to be overridden, simply by insert the new control in a control source that is placed first.

2.1.  XML Control Configuration example

<source mode="on" namespace="Sitecore.Web.UI.XmlControls" folder="/sitecore/shell/override" deep="true"/>
<source mode="on" namespace="myNameSpace" folder="/sitecore modules/controls" deep="true"/>
<!-- UI -->