view raw
Jake Marmak Jake Marmak - 7 months ago 87
ASP.NET (C#) Question

call web config value in javascript src google map api

I am having a problem with the javascript accessing the webconfig file and here's my javascript side...

<script type='text/javascript' src="<%=ConfigurationManager.AppSettings["GoogleAPIKey"]%>"></script>

accessing the webconfig but I am receiving an error...

here's the

<add key="GoogleAPIKey" value="key api"/>

Your helping hand is higly appreciated..


Here's my Solution to my problem..

<script type='text/javascript' src="<asp:Literal runat="server" ID="LitGoogle" />" ></script>