Reading web.config value through javascript
<p>I have web.config with the given value:</p>

<pre><code>&lt;appSettings&gt;
     &lt;add key="vDirectory" value="fr" /&gt;
     &lt;add key="BookingSummaryPage" value="/pli/forms/BookingSummary.aspx" /&gt;
&lt;/appSettings&gt;
</code></pre>

<p>Now I want to read the value of "vDirectory" through java script.</p>

<p>I am using below code:</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;

function test()
{
var t='&lt;%=ConfigurationManager.AppSettings("vDirectory").ToString() %&gt;'
alert(t);
}
&lt;/script&gt;

&lt;input type="button" value="Click Me" onclick="test();" /&gt;
</code></pre>

<p>The error generated is:</p>

<pre><code>Error 'System.Configuration.ConfigurationManager.AppSettings' is a 'property' but is used like a 'method'
</code></pre>
