User Control as Widget in External Assembly - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

User Control as Widget in External Assembly

  • User Control as Widget in External Assembly
  • 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?

  • 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!
  • 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?