Here Mudassar Ahmed Khan has explained with an example, how to read (get) value from the AppSettings section of the Web.Config file in JavaScript in ASP.Net using C# and VB.Net.
It is not possible to read the AppSetting value directly in JavaScript and hence using JavaScript XmlHttpRequest (XHR), an AJAX call will be made to a WebMethod which will read the AppSetting value and return it to the JavaScript function.
↧