Here's the solution I use for a web app. First, I don't want to ignore the Web.config file in svn because it contains important information that can and will change. Thus, I pull the connection string out of the Web.Config, place it in a file called WebCS.config and then use the SVN .ignore directive to avoid checking in just that one file.
To do this, place the following "include" line in the Web.Config:
<connectionStrings configSource="WebCS.config"/>
Then, create the WebCS.config file and enter the following:
<connectionStrings>
<add name="ConnString"
connectionString="Data Source=YourServer;Initial Catalog=YourDB;etc..
providerName="System.Data.SqlClient"/>
</connectionStrings>
This also makes it easy to update web sites: just upload all but the WebCS.config file (I have a batch file to remove the file after "publishing" the site). You'll then be assured that all of the Web.Config file settings go with you without messing with your connection string AND you'll be assured that your repository isn't missing an important file AND you won't be exposing your connection string.