2

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

<script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=<%=ConfigurationManager.AppSettings["GoogleAPIKey"]%>"></script>

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

here's the web.config

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

Your helping hand is higly appreciated..

1 Answers1

1

Here's my Solution to my problem..

<script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=<asp:Literal runat="server" ID="LitGoogle" />" ></script>