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

Forums / Sitefinity SDK / User Control as Widget in External Assembly

User Control as Widget in External Assembly

3 posts, 0 answered
  1. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    04 Mar 2011
    Link to this post
    I am trying to create a widget as a User Control by referencing the documentation located here.  The user control is in a
    separate assembly created as a web app and the .ascx file has a build action of Embedded Resource.  This assembly is added as a reference to the Sitefinity project.  I registered the user control widget with the following values:

    ControlType: CustomControls.Widgets.CustomCalendarUserControl.CalendarControl.ascx, CustomControls
    Name: CalendarControl.ascxc
    Title: Custom Calendar

    I left the rest of the fields empty.

    When I try to drag and drop the control onto a page I get the following error:
    Type "CustomControls.Widgets.CustomCalendarUserControl.CalendarControl.ascx, CustomControls" cannot be resolved.

    Am I registering the user control widget incorrectly or do I need to do something differently if the user control widget is in an external assembly instead of in the Sitefinity project?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    07 Mar 2011
    Link to this post
    Hello Geoff,

    If you want to work with a class library, please create a class and implement ITemplate for it, then register the custom class. If you use a user control, you can add it to a folder of the web application and register the control as described in this article.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Geoff
    Geoff avatar
    89 posts
    Registered:
    02 Mar 2011
    07 Mar 2011
    Link to this post
    I added the ITemplate interface to my user control and implemented it.  The user control is still in an external assembly and I am still receiving the same error.  Is it not possible to register a user control that exists in an external assembly?  Does it have to be contained in the sitefinity web app project?

    Also, I was not able to get the link that you posted to work.  Would you mind reposting it?

    Thanks.
3 posts, 0 answered