title: How can I use an AppSetting from web.config in JavaScript?
body: <p>I have a web.config AppSetting value that I need to use it in my JS files. I use this code in my HTML file and I can't retrieve my variable in JS. </p>
  
  <pre><code>&lt;script&gt;
    var appSettingValue = '@System.Configuration.ConfigurationManager.AppSettings["AccountsAuditMetricID"]';
    // '&lt;%=System.Configuration.ConfigurationManager.AppSettings["AccountsAuditMetricID"]%&gt;';
    // The variable "appSettingValue" will contain the string from your web.config
  &lt;/script&gt;
  </code></pre>
  
  <p>I have this button in my page that I need to hide for some scenarios:</p>
  
  <pre><code>attributes: { 
    'class': 'k-grid-update', 
    'style': "#= metric_fk == $('#appSettingValue') ? 'display: none' : '' #" 
  }
  </code></pre>
  
  <p>I need some help to see how can I use my web.config in my JS. Here is my config:</p>
  
  <pre><code>&lt;appSettings&gt;
    &lt;add key="AccountsAuditMetricID" value="8"/&gt;
  &lt;/appSettings&gt;
  </code></pre>