This topic will show you how can you encrypt your connection string that sit inside your web.config so that others can't see the database login information.
You will need to use aspnet_regiis command tools to help you.
Encrypt:
aspnet_regiis.exe -pef "connectionStrings Name" "C:\Inetpub\wwwroot\MySite" –prov "DataProtectionConfigurationProvider"
Decrypt:
aspnet_regiis.exe -pdf "connectionStrings Name" "C:\Inetpub\wwwroot\MySite"