Hi,
I have web.config with the given value:
<appSettings>
<add key="vDirectory" value="fr" />
<add key="BookingSummaryPage" value="/pli/forms/BookingSummary.aspx" />
</appSettings>
Now I want to read the value of "vDirectory" through java script.
I am using below code:
<script language="javascript" type="text/javascript">
function test()
{
var t='<%=ConfigurationManager.AppSettings("vDirectory").ToString() %>'
alert(t);
}
</script>
<input type="button" value="Click Me" onclick="test();" />
The error generated is:
Error 'System.Configuration.ConfigurationManager.AppSettings' is a 'property' but is used like a 'method'