G
Guest
I'm working on a web app that is published to a hosting service. I'm
developing it on my local PC with VS 2005 and SQL Express. The hosting
service DB is SQL Server 2000.
I have two connectionStrings defined in my web.config file, one for the
development db and another for the production db.
When I publish my app to the hosting site, I rename the two connection
strings so that the production string will be the active string in the
production environment.
I'd rather not have to change strings back and forth to make my app work in
either environment.
Is there a best practice for this type of situation?
My app uses a lot of SqlDataSource controls. Is there a way to dynamically
change the name of the connectionString, defined in the SqlDataSource control
at run-time?
Thanks in advance
Matt
developing it on my local PC with VS 2005 and SQL Express. The hosting
service DB is SQL Server 2000.
I have two connectionStrings defined in my web.config file, one for the
development db and another for the production db.
When I publish my app to the hosting site, I rename the two connection
strings so that the production string will be the active string in the
production environment.
I'd rather not have to change strings back and forth to make my app work in
either environment.
Is there a best practice for this type of situation?
My app uses a lot of SqlDataSource controls. Is there a way to dynamically
change the name of the connectionString, defined in the SqlDataSource control
at run-time?
Thanks in advance
Matt