Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I have this in my code:
<script type="text/javascript" src="path?key=1234567890"> </script>
I added this in web.config:
<appSettings> <add key="key" value="1234567890"/>
How to implement it in the above code?
You use the System.Web.Configuration.WebConfigurationManager.AppSettings collection to access the configuration settings.
System.Web.Configuration.WebConfigurationManager.AppSettings
<script type="text/javascript" src="path?key=<%=WebConfigurationManager.AppSettings["key"]%>"> </script>
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.