Registering UserControl with src/path from appSettings RRS feed

  • Question

  • User1519416827 posted

    Hello, everyone.


    We have a webapp, where a few usercontrols are rather specific for the individual deployments/customers. I'm now trying to make the configuration as simple as possible, by registering the usercontrol in the page, but getting the src/path from appsettings.

    In appSettings.config I have

    <add key="IndividualMappingsSourceFile" value="~/Controls/ConfigMappingsIndividual.ascx" />


    but in the ASPX i have tried several approaches/syntaxes, like

    <%@ Register Src="<%$appSettings:IndividualMappingsSourceFile %>"  TagPrefix="wpm" TagName="ConfigMappingsIndividual" %>


    I expect this to be rather simple, but I don't seem to be able to get the correct syntax. Can anyone help me out here?

    Wednesday, May 29, 2013 4:38 AM