Embed Custom Control inside Widget Template

Posted by Community Admin on 04-Aug-2018 19:12

Embed Custom Control inside Widget Template

All Replies

Posted by Community Admin on 18-Sep-2012 00:00

I'm using Sitefinity 5.1

I'm trying to embed a custom user control inside the default Search widget template. How can I do this?

Posted by Community Admin on 21-Sep-2012 00:00

You should be able to reference the control after adding in a tag prefix.

<%@ Register TagPrefix="custom" Namespace="SitefinityWebApp.Custom" Assembly="SitefinityWebApp" %>
<custom:controlname property="value" runat="server"></custom:controlname>

You would just need to change the Namespace value to the Namespace of your User Control. Then in the control element, change out "controlname" with the name of your user control class. And finally, you would change add in your custom properties as you would in a control designer.

This thread is closed