Link to home
Start Free TrialLog in
Avatar of IandINSW
IandINSW

asked on

Adding Javascript to an ASP.NET page based on Environment Setting

Hello,
I have a Web.Config App.Setting which holds the following

<appSettings>
  <add key="Environment" value="Development"/>
</appSettings>

I am then reading this value and depending the value I will read a particular JavaScript from a file.

i.e
<script src="~/Scripts/Development.js"></script>
or
<script src="~/Scripts/Test.js"></script>

etc
ASKER CERTIFIED SOLUTION
Avatar of Craig Wagner
Craig Wagner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial