The directory does not really exist so when the dom objects access paths like this, they won't work
<script type="text/javascript" src="~/Scripts/jquery.lavalamp.js"></script>
Neither will this
<script type="text/javascript" src="../Scripts/jquery.lavalamp.js"></script>
But this will
<script type="text/javascript" src='<%= ResolveUrl("~/Scripts/jquery.lavalamp.js") %>'></script>
So there ya have it. Use the ResolveUrl method to fix those pesky paths once and for all and not have to change it prior to moving to production.
Happy Coding..
Merlin
No comments:
Post a Comment