In your web.config/app.config file add ConnectionString
<connectionstrings>
<remove name="LocalSqlServer" />
<add name="myConnection" connectionstring="Data Source=MASTER-YODA;Initial Catalog=MyDatabase;User ID=myuserId;Password=mypassword" />
</connectionstrings>
In your Database connection class use this connection string
public string conString = ConfigurationManager.ConnectionStrings["myConnection"].ConnectionString;
SqlConnection con = new SqlConnection(conString);