New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

How to read Telerik appSettings from an external file


Load the Telerik appSettings flags from an external file.


The UI for ASP.NET AJAX controls provide [a lot of switches and settings you can set from the appSettings section in the web.config](/devtools/aspnet-ajax/getting-started/installation/web-config-settings-overview#control-properties-you-can-set-from-the-webconfig. In some cases you may want to declutter the web.config file and read these settings from a separate file. This can even facilitate deployment and testing, especially if you also use your own flags in the appSettings section.


ASP.NET allows you to import sections of the web.config file from an external file that is under the same folder. To do this:

  1. copy the appSettings section in your desired configuration file (e.g., in ~/App_Data/myAppSettings.config)
  2. remove the contents of the appSettings section
  3. set the configSource attribute of the appSettings tag to point to the external file (configSource="App_Data\myAppSettings.config"). Note the backslash that denotes a physical path.

You can find attached a small example below. Just add the Telerik assemblies to the ~/bin folder.


A sample project that demonstrates the approach can be found attached here:

In this article