More in this section

Forums / General Discussions / User control file not found when draging on the page

User control file not found when draging on the page

8 posts, 0 answered
  1. Vincent
    Vincent avatar
    41 posts
    Registered:
    21 Sep 2007
    22 Jan 2011
    Link to this post
    Hi,

    Trying to create a simple user control 'ImagesRotator', I have followed the Sitefinity RTM documentation 'Creating a widget as a user control'.
    I have created the folder MyControls in the application root and added aspx and cs files.
    After successfully creating the Widget in the Toolboxes settings with ControlType = "~/MyControls/ImagesRotator.aspx", I tried to drop the widget to a page and had the message : the file doesnot exists.
    Depending on how I launch the application from Project Manager or Visual Studio, the file name in the message box is :
    /<project-name>/MyControls/ImagesRotator.aspx
    or /MyControls/ImagesRotator.aspx
    Note that the widget appears on the page but is not editable nor deletable.

    Any idea ?

    Regards
    Vincent
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    25 Jan 2011
    Link to this post
    Hi Vincent,

    Please make sure that your file exists in the MyControls folder under the root of your website. Also please check there are no typos in the control registration and that you have built the site.

    Kind regards,
    Radoslav Georgiev
    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. PI Dev
    PI Dev avatar
    4 posts
    Registered:
    07 Jul 2010
    05 Aug 2011
    Link to this post
    What does it mean when you say 'build the site'?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Aug 2011
    Link to this post
    Hi Pi Dev,

    Open the SitefinityWebApp project in Visual studio and use Build.

    Greetings,
    Radoslav Georgiev
    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
  5. PI Dev
    PI Dev avatar
    4 posts
    Registered:
    07 Jul 2010
    09 Aug 2011
    Link to this post
    And if you don't have a copy of Visual Studio on the production server what do you do?
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    10 Aug 2011
    Link to this post
    Hello Pi Dev,

    Open the ASCX file in the Control directive instead of CodeBehind use CodeFile and set the application relative path to the CS file. This will make ASP.NET compile the code at runtime.

    All the best,
    Radoslav Georgiev
    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
  7. PI Dev
    PI Dev avatar
    4 posts
    Registered:
    07 Jul 2010
    10 Aug 2011
    Link to this post
    That worked.

    Is there going to be much of a performance hit for using this technique?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Aug 2011
    Link to this post
    Hi Pi,

    This should not affect the performance. You can take a look at the discussion here.

    All the best,
    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
8 posts, 0 answered