unable to add user control - General Discussions - General Discussions - Progress Community
 General Discussions

unable to add user control

  • unable to add user control
  • I created a custom user control and in doing so I followed the "tutorial" that I read in the SF 4 docs. I can see the new widget in the toolbox when I goto the page templates, but when I drag and drop the widget to the template, I'm getting the following error message:

    'couldnot load type SitefinityWebApp.usercontrol.myUsercontrol.ascx'

    the widget is just some basic HTML, how can I use this widget that i created?
  • Hello DotNetGuy,

    Can you attach a screenshot of the Configuration settings you used to register the control and the control location in your solution?

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Config settings??


    I have the control in /SitefinityWebApp/usercontrols/usercontrolname.ascx

  • Hi DotNetGuy,

    I mean Administration >> Settings >> Advanced >> Toolboxes >>... where you register the control and its location on the server.

    Administration >> Settings is represented by configuration provider ( xml file storage) which stores the data inside App_Data/Sitefinity/Configuration

    The error you see means that the path you used to register the control is not correct. You see the widget in the list, because you have "added" a new toolbox item - new record in the configuration, but the config element does not know whether the path the control is correct or not

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • how do I add the information to the app_data/sitefinity/configuration folder?

    Is there any doc on this? So far I haven't found anything on it
  • 247817_HelloWorldControl.zip
    Hi DotNetGuy,

    I am sending you a short video that shows how to register a control.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • there was no sound, but from what I could see I did all of that and still no luck
  • it worked! ! ! ! !

    though I did nothing different then the first 5 times, but this time it worked
  • Hi,

    I am getting the same problem here, the settings are correct because when I put a 'not correct' location of the control I get the error "The file '/MYAPP/MdyControls/Lexique.ascx' does not exist."

    But I am getting Could not load type 'SitefinityWebApp.MyControls.Lexique', when I set the correct virtual path for the user control.

    My control is very basic, with just a simple static test to see if it works or not.
  • Hi martani,

    I cannot replicate issues with adding custom or user controls. Please take a look at attached video in one of the previous posts. It shows the process of creating and registering a control in Sitefinity. Make sure that you build the application after the control is created.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Martani,
        Did you rebuild your project? Once I did that with my usercontrol I was fine,  just adding it to the toolbox wasn't good enough, I had to rebuild my Sitefinity project and then it worked.
  • Thanks DotNetGuy,

    I confirm that rebuilding the project makes Sitefinity to recognize the control.
  • How am I supposed to rebuild the project on a production server without visual studio...
  • Hi,

    Make a dummy change in the web.config or restart the server.

    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