Advanced Setup

Do advanced User Control setup tasks 

You can change the root folder for User Control function files (ascx/ascx.cs files).

Changing the root folder for User Control function files

By default, all the ascx/ascx.cs files are saved in ~/App_Data/UserControls. It serves as the root folder for User Control function files.

You can change the root folder, for example, to ~/App_Data/Shared/UserControls.

  1. First, copy the web.config from ~/App_Data/UserControls to your new UserControls folder (e.g. ~/App_Data/Shared/UserControls).
  2. Then, edit ~/App_Data/Composite/composite.config.
  3. Locate configuration/Composite.Functions.Plugins.FunctionProviderConfiguration/
    FunctionProviderPlugins/add[@name="UserControlFunctionProvider"]
    .
  4. Change the directory attribute's value to a different folder (e.g. ~/App_Data/Shared/UserControls).
  5. Finally, restart the server (Tools | Restart Server).
<Composite.Functions.Plugins.FunctionProviderConfiguration>
	<FunctionProviderPlugins>
		<!-- skipped -->
		 <add name="UserControlFunctionProvider" directory="~/App_Data/Shared/UserControls" 
			 type="Composite.Plugins.Functions.FunctionProviders.UserControlFunctionProvider.UserControlFunctionProvider, Composite" />
		<!-- skipped -->
	</FunctionProviderPlugins>
</Composite.Functions.Plugins.FunctionProviderConfiguration>

UserControl