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.
- First, copy the
web.configfrom~/App_Data/UserControlsto your new UserControls folder (e.g.~/App_Data/Shared/UserControls). - Then, edit
~/App_Data/Composite/composite.config. - Locate
configuration/Composite.Functions.Plugins.FunctionProviderConfiguration/.
FunctionProviderPlugins/add[@name="UserControlFunctionProvider"] - Change the
directoryattribute's value to a different folder (e.g.~/App_Data/Shared/UserControls). - 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

