1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Embed Custom Control inside Widget Template

Embed Custom Control inside Widget Template

2 posts, 0 answered
  1. Jesse
    Jesse avatar
    6 posts
    Registered:
    10 Aug 2011
    18 Sep 2012
    Link to this post
    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?
  2. Richard Baugh
    Richard Baugh avatar
    201 posts
    Registered:
    22 Aug 2012
    21 Sep 2012
    Link to this post
    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.
2 posts, 0 answered