title: How to define Sqlconnection Globally in asp.net c#
body: <p>I have defined connectionstring in web.config like this</p>
  
  <pre><code>&lt;add name="connect" connectionString="Initial Catalog=MyDatabase;User ID=sa;Password=mypassword" /&gt;
  </code></pre>
  
  <p>So I have to create Sqlconnection in each page inside class like this</p>
  
  <pre><code>SqlConnection cn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["connect"].ConnectionString);
  </code></pre>
  
  <p>I don't want to create SqlConnection in each page. Is there any way to create sqlconnection only once and use it in every page ?</p>