I store several different connection strings in my web.config for development and testing. All but one is commented out so I can change info as needed.
If you need to Add/Insert/Setattributes inside a replaced connectionstring (for example if you use deployments) you can nest the transformations to remove the comments and replace the attributes: