User control file not found when draging on the page

Posted by Community Admin on 03-Aug-2018 10:29

User control file not found when draging on the page

All Replies

Posted by Community Admin on 22-Jan-2011 00:00

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

Posted by Community Admin on 25-Jan-2011 00:00

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

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

What does it mean when you say 'build the site'?

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

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

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

And if you don't have a copy of Visual Studio on the production server what do you do?

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

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

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

That worked.

Is there going to be much of a performance hit for using this technique?

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

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

This thread is closed