title: Accessing ConfigurationManager.AppSettings in Java script
body: <p>I had this javascript code in aspx file</p>
  
  <p>Page.aspx</p>
  
  <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server"&gt;
   ----some code----
   added after suggestion from Satpal
   &lt;script type="text/javascript"&gt;
  var GAAccountId = '&lt;%=ConfigurationManager.AppSettings["GAAccountId"]%&gt;';
  &lt;/script&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  &lt;%--&lt;script type="text/javascript"&gt;
          debugger;
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', '&lt;%=ConfigurationManager.AppSettings["GAAccountId"]%&gt;']);
          _gaq.push(['_setDomainName', 'auto']);
          _gaq.push(['_setAllowLinker', true]);
          _gaq.push(['_trackPageview', '/Register']);
          _gaq.push(['_trackPageLoadTime']);
  
          (function () {
              var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
              ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
              var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
  
      &lt;/script&gt;--%&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Now I  moved this code to seprate .js file and included the reference in javascript file.Now I am not able to access it.it is coming as it <code>"'&lt;%=ConfigurationManager.AppSettings["GAAccountId"]%&gt;']"</code></p>
  
  <p>How to get the value from it.</p>