You can use the connections string property in app.config file;
<configuration>
<connectionStrings>
<add name="studentConnectionString" connectionString=" Data Source=SW-PC-20;Initial Catalog=PSM;Integrated Security=True;Integrated Security=True; providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
In code behind, you can call this connection string using the code ,
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["studentConnectionString"].ConnectionString);
After that you need to change the connection string part only. becouse you are refering using name only.
hop you got the idea. if you need more clarification,
please ping me.