2

我在 javascript 访问 webconfig 文件时遇到问题,这是我的 javascript 方面...

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

访问 webconfig 但我收到错误消息...

这是web.config

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

非常感谢您的帮助。

4

1 回答 1

1

这是我的问题的解决方案..

<script type='text/javascript' src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=<asp:Literal runat="server" ID="LitGoogle" />" ></script>
于 2016-10-12T19:37:28.940 回答