RadEditor for ASP.NET

The 'RadControls' Folder Send comments on this topic.
See Also
Installation and deployment > Installation > Files and Folders needed by Telerik RadControls > The 'RadControls' Folder

Glossary Item Box

The RadControls folder is an essential part of Telerik RadControls for ASP.NET - it contains all resources needed for the components to function properly (i.e. images, client-side scripts, configuration files, skins, etc.).

You will need to copy this folder in your web application only if you intend to use skins different from the default or if you plan to modify the JavaScript files. However because of the specific control features, you will always need to copy /RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products.

Each Telerik component seeks its resources in the respective subfolder of RadControls: for example, /RadControls/Editor is the folder where the resources for Telerik RadEditor reside.

Copying the RadControls folder to your web application

To work with Telerik RadControls for ASP.NET, you need to copy the RadControls folder to your web application. The folder must contain all the subfolders of the controls you are going to use. Do not copy the subfolders of controls you are not planning to use as this may cause a number of compilation errors: Visual Studio 2005 compiles all files in the web project; errors occur when missing assemblies are not found. 

Do not include the RadControls folder in your VS.NET solution!   HideWhy?

When the RadControls folder is included in a VB.NET project, VS.NET tends to change some files within the RadControls folder automatically. The extent of these changes depends on the IDE settings; notably, the following controls are affected:
  • Telerik RadEditor
  • Telerik RadSpell 
  • Telerik RadChart
Telerik controls are written in C# - hence the several *.CS codebehind files within the RadControls/[control] folder. When such .ASCX/ASPX files are included in the project, VS.NET automatically changes the Language attribute of their Page/Control directive from cs to vb and breaks the control.

To avoid the problem:
  1. In Windows Explorer, do a filtered search to locate all ASPX and ASCX files within the RadControls folder.
  2. Once the search is over, select all files and right-click to get their properties.
  3. Select the Hidden check box and click OK.
Now Visual Studio will not see the files, so errors will not be thrown. At the same time IIS will see the files and will display them fine.

If you have already included the RadControls folder in your VS2005 project:
  1. Open your Visual Studio 2005 project.
  2. In the Solution Explorer locate the RadControls folder and expand it.
  3. Locate the problematic ascx files, right-click them and select "Exclude from project". Unfortunately, this can be done for files only (unlike VS2003), so the process should be repeated for all ascx files.
  4. Open Windows Explorer, navigate to your project's folder.
  5. Back up the RadControls folder from your project, especially any customized files you may have (ConfigFile.xml, ToolsFile.xml, any css files, images. etc).
  6. Delete the damaged RadControls folder.
  7. Navigate to the installation folder of Telerik RadEditor (for example).
  8. Copy the RadControls folder from the installation folder to the root of your web application.
  9. Rebuild and run your project.

Moving the RadControls folder within your web-application

  1. Manually copy the RadControls folder to the new location within your web application (for example, ~/Resources/).
    Do not use the VS.NET IDE to copy/move the RadControls folder to another location as it changes the namespaces of the files and changes the project language from C# to VB which in turn breaks the application! Use Windows Explorer instead.
  2. Either:
    • Specify its position in the RadControlsDir property in the control's declaration in your ASCX/ASPX file, e.g.
        Copy Code
      <rad:RadEditor
           
      RadControlsDir="~/Resources/RadControls/" ...>
      </
      rad:RadEditor>
    • Or set the property globally from the Web.config file of the application: 
        Copy Code
      <configuration>
           
      <appSettings>
                  
      <add key="Telerik.WebControls.RadControlsDir" value="~/Resources/RadControls/"/>
           
      </appSettings>
      </
      configuration>
      Notes.
      • In the above examples, the tilde "~" represents the root of your web application.
      • If the RadControlsDir property has been set in more than one way, the value set from Web.config is overridden.

Moving the RadControls folder outside your web-application

This is the best scenario if you want to have a single RadControls folder for several applications. This mechanism also enables different versions of Telerik products to reside in different web applications:

  1. Manually copy the RadControls to the new location.
    Do not use the VS.NET IDE to copy/move the RadControls folder to another location as it changes the namespaces of the files and changes the project language from C# to VB, which in turn breaks the application! Use Windows Explorer instead.
  2. Create a virtual directory with name RadControls under each application's root which points physically to the same physical RadControls folder. That physical folder should include all the scripts and other required settings of the controls.
    The respective RadControls virtual directory should NOT be a web application but virtual directory only! You can find more information on the topic in the following KB article: (ID#728) Error Message: Could not load type 'Telerik.WebControls.Dialogs.Dialog'.
  3. Either:
    • Specify its position in the RadControlsDir property in the control's declaration in your ASCX/ASPX file, e.g.

       

    • Or set the property globally from the Web.config file of the application: 
        Copy Code
      <configuration>
           
      <appSettings>
                 
      <add key="Telerik.WebControls.RadControlsDir" value="~/RadControls/"/>
           
      </appSettings>
      </
      configuration>
      Notes.
      • In the above examples, the tilde "~" represents the root of your web application.
      • If the RadControlsDir property has been set in more than one way, the value set from Web.config is overridden.
      • Make sure you set the RadControlsDir property to "~/RadControls/" (with a slash following the folder name).

"You have not copied the RadControls folder to the root folder of your web-application" error message

When opening a page which contains Telerik RadEditor, the following error message appears:
Telerik RadEditor v7.0: You have not copied the RadControls folder to the root folder of your web-application or you have applied an update incorrectly."

This message shows that the control is not able to locate its RadControls/editor folder. It usually appears after updating the control to a newer version. The causes for the message to appear are:

  • The assembly version and the RadControls/editor folder version are from different installation downloads, i.e. from different Telerik RadEditor versions.
    Example: RadEditor.NET2.DLL is version 7.0.2, whereas the Telerik RadEditor's RadControls/Editor folder is from version 7.0.1 or other.
  • The proper assembly is in the bin folder of the application, but the RadControls/editor folder is missing or misplaced.

To solve the problem:

  1. Check whether the RadControls folder is placed in the root of your web application and that you have NOT set the RadControlsDir property to point to another location.
  2. Check whether the RadControls/editor folder contains a subfolder, named Scripts, and a subfolder which carries the version of the control as its name.
    For example, if you use Telerik RadEditor v7.0.2 - the folder should be \RadControls\Editor\Scripts\7_0_2 and this version number should match the RadEditor.NET2.dll version placed in the /bin folder.
    If such discrepancy exists between the control's assembly and the RadControls folder, use a DLL and RadControls folder from a working application or download the ZIP file from your Client.net account and use the files from there.
  3. Another reason could be that some files from the RadControls/editor folder are missing or damaged. Please delete the current RadControls folder and paste the original one from the same download that you have the assembly from.
  4. For some reason your project may still reference the previous version of control's DLL, and not the latest. In this case we suggest removing the old assembly reference from your VS.NET project and adding a new reference to to the new assembly.
  5. If you have added the control in the GAC (Global assembly cache), remove it by running gacUtil and then add the new version.
  6. If you are trying to move the RadControls folder through the RadControlsDir property, please review the following section for resolution:
  7. [not related to Telerik controls] Delete .NET, VS and browser caches because they can cause a problem too:

  8. Terminate the aspnet_wp.exe process (from the Windows Task Manager)
  9. Open a Windows Explorer and navigate to
    C:\Windows(WINNT)\Microsoft.NET\Framework\vYOUR_VERSION\Temporary ASP.NET Files
  10. Delete all the folders with names, corresponding to your Telerik projects.
  11. Delete your Visual Studio web project caches as well - they should be located at C:\Documents and Settings\VSWebCache.
  12. Delete your browser cache: Tools -> Internet Options -> Delete Files....
  13. See Also