I am using this tutorial to use a variable from web.config file into .NET . Now I want to use the exact same variable in JavaScript but according to my research the WebConfigurationManager variable is not available in HTML , any clue on how to do that ?
thanks
EDIT :
I tried to implement the suggested code in that way (just to make sure that it gives me the output I want):
var myJsVar = '<%= ConfigurationSettings.AppSettings["MyConfigValue"] %>';
alert(myJsVar);
the value of myJsVar come up as
<%= ConfigurationSettings.AppSettings["MyConfigValue"] %>
and when I do '<%= ConfigurationSettings.AppSettings["MyConfigValue"] %>'
and when I do alert(myJsVar.valueof()); instead I receive undefined as output
I also tried to use WebConfigurationManager instead of ConfigurationSettings and it goes through the same logic ...