you could create a personal build configuration ( https://msdn.microsoft.com/en-us/library/kwybya3w.aspx )and define in that configuration some custom tags so that in the code you could have
#if MyBuild
public static string conStr = @"My connection string";
#endif
#if HisBuild
public static string conStr = @"His connection string";
#endif
to define your custom
open the project's Property Pages -> Build then modify the Conditional Compilation Constants property after having selected your custom Configuration.
this is how you can define your own symbols and then have the #if #endif that practically include/exclude code based on your current build settings (like writing #define YourSymbol on the top of every page)
another solution could be just to add an external reference to your appsettings, and having that referenced file not be included in your source repository (so that you don't share it)
this way any programmer can have its own file configuration
just put in your app.config/web.config a line like
<appSettings configSource="YourCustomConfiguration.config"/>
and then do not add it to teamfoundation or whatever cvs you use
of course the YourCustomConfiguration.config is a file, you can put it wherever you want, just specify a relative path
well, i've said appsettings but you can use configSource for whatever you need, in your case <connectionStrings configSource="YourCustomConnectionStrings.config">