title: Get connectionstring from web.config
body: <p>I use <code>System.Configuration.ConfigurationManager.AppSettings["key1"]</code> in <strong>settings.designer.cs</strong> file. It's working fine in the development but after I moved all the <strong>.dll</strong> files into production it is not working.</p>
  
  <p>In <code>web.config</code> file I added app settings in development and production both. What is the problem? </p>
  
  <p>Code from settings.designer.cs file</p>
  
  <pre><code>get
  {
    return WebConfigurationManager.AppSettings["ConnectionString"];
    //return (AppSettings["ConnectionString"]);
    //return ((string)(this["ConnectionString"])); 
  }
  </code></pre>
  
  <p>I tried all three return statements. 3rd return is working fine in both dev &amp; prod but it is not rendering from web.config.</p>
  
  <p>Code in web.config</p>
  
  <pre><code>&lt;add key="ConnectionString" value="connection string values are given here"&gt;
  </code></pre>