Thursday, 9 January 2014

Read confige (web.confing,app.config etc) file settings from javascript

hi all,

so many times we need to read config (web.confing,app.config etc) file settings from javascript
i searched a lot and finally i got the answer.

var setting = '<%=System.Configuration.ConfigurationManager.AppSettings["YourKeyNameHere"].ToString() %>';
alert(setting);

this is simple.
enjoy scripting...

No comments:

Post a comment