Including relative path
When you create a new page you can include header links to css and js. I have created a folder callled js that exists at the same level as App_Data. I wish to reference a file within the page header at this level but am unsure how the relative path should appear?
<script type="text/javascript" src="/js/myJavascriptFile.js"></script>
<script type="text/javascript" src=" ~/js/myJavascriptFile.js"></script>
The first one is what you want, the slash at the start denotes "Start at the web root". The second wont work at all as the "~" denoates an asp.net relative link, but that's resolved in the asp.net controls serverside, it's not a browser thing. So the only what to resolve a ~ is to put runat="server" in the markup, but in this case if you do that it'll try and run the SCRIPT serverside and tank on you :)
...so use the first option :)
Steve
Thank you Steve for your full answer
@Steve
Unless (of course) you were to override the main Render() event and process <script> tags. Not that I think it's a good idea, but I guess it's possible to do.