I have a javascript code in the aspx file.
In my script function, I am trying to read the 'SiteRootURL' value from the web.config as:
var k = '<%=ConfigurationManager.AppSettings["SiteRootURL"].ToString() %>'
alert(k);
This is not working. When I add above code, I get blue squirkly lines at the top of my aspx page - <%@Page...%> which says - Identifier Expected'
When I remove the above line, the code runs fine. Please help me. What am I doing wrong? How can I read the value form the web.config in javascript.