title: Keep connection string open or not c#
body: <p>If I have a few classes using the same connection string on the same page should I keep the connection <code>open();</code> and close it once I'm finished or keep opening and closing.</p>
  
  <p><strong>example below</strong></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      cs.Open();
      something ...
      cs.Close();    
  }
  
  protected void Button1_Click(object sender, EventArgs e)
  {
  
      cs.Open();
      something .....
      cs.Close();
  }
  </code></pre>
  
  <p><strong>Or This</strong></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      cs.Open();
      something ...
  }
  
  protected void Button1_Click(object sender, EventArgs e)
  {
      something .....
      cs.Close();
      cs.Dispose();
  }
  </code></pre>