I've created WebControl by extending Sitecore.Web.UI.HtmlControls.Control class and implemented DoRender method. Adding either in another control or by adding to xml file don't call DoRender method at all. Possible exist any config setting or something else?

using Sitecore.Web.UI.HtmlControls;

namespace Foundation.SitecoreExtensions.HtmlControls
    public class UnorderedList : Control
        public UnorderedList()

        protected override void DoRender(System.Web.UI.HtmlTextWriter output)

Add to xml file not working.

<?xml version="1.0" encoding="utf-8" ?> 
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
    <Inline RollOver="true" Class="scRollover" Click="$Command">
      <ThemedImage Src="$Icon" Width="16" Height="16" Align="absmiddle" />
      <Literal Text="$Header"/>


Add by another webcontrol not working though sitecore controls are working.

UnorderedList unorderedListControl = new UnorderedList();


  • Show some code, show screenshots from where you try to add it. Show Sitecore content tree with your new control Dec 21 '20 at 12:45

To use custom controls you have to add namespace and assembly with your custom code to config in my case:

<source assembly="Foundation.SitecoreExtensions" namespace="Foundation.SitecoreExtensions.HtmlControls" prefix="html" mode="on"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.