110
rated 0 times
[
114]
[
4]
/ answers: 1 / hits: 17539
/ 15 Years ago, fri, june 26, 2009, 12:00:00
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'
More From » javascript