Let's suppose you have a value that you are storing in the web.config for a given website. And let's further suppose you have some nifty JavaScript that needs to access that value. Here's how you do it.
First you need to assign that value to a protected string in your C# (or other preferred language) code like this:
protected string myValue = ConfigurationSettings.AppSettings["myValue"].ToString(); Then in JavaScript, you can use the variable just like you would do old-school inline classic ASP:
var myValue = "<%=myValue%>"; Enjoy.