More in this section

Forums / General Discussions / Problems Adding a User Control

Problems Adding a User Control

2 posts, 0 answered
  1. PI Dev
    PI Dev avatar
    4 posts
    07 Jul 2010
    05 Aug 2011
    Link to this post
    We're having problems adding user controls to Sitefinity 4.1. We're using the procedure described in:

    Here's the process:

    1. Added a folder to the Sitefinity site's file structure named UserControls,
    2. Copy the control, in its folder named TestControl, to the web site,
    3. Use the administration back-end to register information about the control with Sitefinity,

    When we drag the control to a page or a template we get this error: Could not load type 'SitfinityWebApp.UserControls.TestControl.TestControl'

    In our research we found that this can be caused by an incompletely compiled .Net web site. As a test we downloaded the site to a local workstation, did steps 1 and 2 as described above, then built the project. (CTRL+SHIFT+B) Then we copied the site back to the server and repeated step 3 to register the control. Now the control is available.

    Surely this isn't how it's supposed to work.

    What are we doing wrong?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    08 Aug 2011
    Link to this post

    Please take a look at this post where I attached a short video that illustrates how to register a control to Sitefinity's toolbox.

    If you use a web application and make a modification to a file, you need to build the web application and get the compiled dll from the bin. For websites you don't need to build the application after each modification.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered