Can I set some Web.config values from variable defined on another .config file?

Multi tool use


Can I set some Web.config values from variable defined on another .config file?
Let saying I'm settings a connection string for my Web.Release.config
:
Web.Release.config
<connectionStrings xdt:Transform="Replace">
<add name="ProjectEntities" connectionString="Data Source=url;Initial Catalog=catalog;User Id=userid;Password=password;" />
</connectionStrings>
Is there a way to use (for this case) url
, catalog
, user
and password
as variables defined on another .config file?
url
catalog
user
password
Such as creating Web.CustomPasswords.config
and store the variables (names as before):
Web.CustomPasswords.config
<appSettings>
<add key="url" value="http://mydb.server.net" />
<add key="catalog" value="MyDbName" />
<add key="userid" value="markzzz" />
<add key="password" value="12345" />
</appSettings>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.