I want to read an app key from the web.config file via java script. The web.config key to be read
<appSettings>
<add key="Key1" value="value1" />
<appSettings>
I include the following inside my java script function.
function Evaluate() {
var key = '<%=ConfigurationManager.AppSettings["Key1"].ToString() %>';
alert(key);
}
However, I end up getting <%=ConfigurationManager.AppSettings["Key1"].ToString() %> in the alert.
What am i missing?