I would strongly recommend not hardcoding your connection strings into your code. Please consider pointing your code to a web.config transform. You can add the connection string there and depending on the version of code the proper transform can be applied so that you simply need to use the following code once in your app to cover all environments.
ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString
Inside of the debug version you could have something similar to
<configuration xmlns:xdt="...">
<connectionStrings>
<add name="MyConnectionString" connectionString="debugstring"
providerName="debugprovider" />
</connectionStrings>
</configuration>
Inside your release version you can tell the transform to replace your old string as so
<configuration xmlns:xdt="...">
<connectionStrings>
<add name="MyConnectionString" connectionString="newstring"
providerName="newprovider"
xdt:Transform="Replace" />
</connectionStrings>
</configuration>
for more reference check out http://msdn.microsoft.com/en-us/library/dd465326.aspx