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

Forums / General Discussions / unable to add user control

unable to add user control

15 posts, 0 answered
  1. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    02 Feb 2011
    Link to this post
    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?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Apr 2017
    02 Feb 2011
    Link to this post
    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
  3. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    03 Feb 2011
    Link to this post
    Config settings??


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

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Apr 2017
    03 Feb 2011
    Link to this post
    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
  5. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    04 Feb 2011
    Link to this post
    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
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Apr 2017
    04 Feb 2011
    Link to this post
    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
  7. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    04 Feb 2011
    Link to this post
    there was no sound, but from what I could see I did all of that and still no luck
  8. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    04 Feb 2011
    Link to this post
    it worked! ! ! ! !

    though I did nothing different then the first 5 times, but this time it worked
  9. martani
    martani avatar
    27 posts
    Registered:
    24 Jan 2011
    10 Feb 2011
    Link to this post
    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.
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Apr 2017
    10 Feb 2011
    Link to this post
    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
  11. NuToSitefinity
    NuToSitefinity avatar
    140 posts
    Registered:
    01 Sep 2010
    10 Feb 2011
    Link to this post
    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.
  12. martani
    martani avatar
    27 posts
    Registered:
    24 Jan 2011
    11 Feb 2011
    Link to this post
    Thanks DotNetGuy,

    I confirm that rebuilding the project makes Sitefinity to recognize the control.
  13. James
    James avatar
    3 posts
    Registered:
    16 Mar 2011
    23 May 2011
    Link to this post
    How am I supposed to rebuild the project on a production server without visual studio...
  14. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Apr 2017
    23 May 2011
    Link to this post
    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
  15. Mark
    Mark avatar
    0 posts
    Registered:
    01 Mar 2017
    02 Mar
    Link to this post

    Hi,

    We're using SiteFinity 9.1 and I'm having trouble getting a custom user control to show up in the toolbox. I followed the tutorials and watched the video referenced here. It's a basic Hello World control. I registered through the Admin and also using Thunder. It adds the info to the toolboxes config file as the following:

            <add enabled="True" name="My Widgets" title="My Widgets" description="My Widgets">
              <tools>
                <add enabled="True" type="~/CustomControls/HelloWorld/HelloWorld.ascx" title="HelloWorld" description="HelloWorld" visibilityMode="None" name="HelloWorld" />
              </tools>
            </add>

    I've even built the application and restarted SiteFinity and still my control doesn't appear. Neither does the new section I created. 

    What could I be doing wrong?

15 posts, 0 answered