Is there a way where I can add a connection string to the ConnectionStringCollection returned by the ConfigurationManager at runtime in an Asp.Net application?
I hav
Haven't tried it yet, but perhaps you can alter the value of an existing connection string at runtime? For example, instead of:
ConfigurationManager.ConnectionStrings.Add(new ConnectionStringSettings(params));
Maybe you could do something like:
ConfigurationManager.ConnectionStrings["myconnection"].ConnectionString = "something";
If so, you could specify the connection string "variables" in config, but set them to false or empty connection strings: