VS 2010: Web.config transformations
Visual Studio 2010 offers an easy way to maintain web.config files for the various application hosting environments. VS 2010 lets us define environment specific configuration settings in separate config files. When publishing the web application to a specific environment, we can choose the configurations that need to be deployed, so that VS2010 can generate the web.config specific to the deployment environment. Check out this documentation for the usage of the feature.
1. MSDN Online