Problems Adding a User Control

Posted by Community Admin on 03-Aug-2018 20:20

Problems Adding a User Control

All Replies

Posted by Community Admin on 05-Aug-2011 00:00

We're having problems adding user controls to Sitefinity 4.1. We're using the procedure described in: www.sitefinity.com/.../sitefinity-essentials-controls-adding-controls-to-the-toolbox.html

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?

Posted by Community Admin on 08-Aug-2011 00:00

Hi,

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

This thread is closed