title: Use connectionstring from web.config in source code file
body: <p>I know this might be a very basic question, but maybe thats why I'm having problems finding the answer. Right now I'm creating database connections in my source files by doing something like this:</p>
  
  <pre><code>SqlConnection con = new SqlConnection("Data Source=...Password=...);
  SqlCommand cmd = new SqlCommand(String.Format("SELECT * FROM Table;"), con);
  con.Open();
  SqlDataReader reader = cmd.ExecuteReader();
  </code></pre>
  
  <p>But this means that if I choose to change databases it will be a major pain. Do you guys know how to use the connection string from a web.config file instead?</p>
  
  <p>Thank you!</p>