How to change connectionstring for Home and Office ?

preno 60 Reputation points

I need to use a different connecton strings to my developmente DB when I work at home than the one used at Office. I also need different connection string for deployment. For now I simply comment the rows in the web.config each time.

Is there an easy way to do this?

I thought at conditional compilation symbols, but i don't know if is a good way.


A set of technologies in the .NET Framework for building web applications and XML web services.
3,386 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,791 questions
{count} votes