Introduction
Today, every application uses JavaScript. For referencing JavaScript in our .NET application in ASPX pages, we use the following syntax:
<script src="jquery.min.js" type="text/javascript" charset="utf-8"></script>
When working with Routed URLs, the above syntax fails to download the referenced JavaScript files.
Using the code
To resolve this issue, the scripts should be re-written as below:
<script src="<%=ResolveUrl("~/jquery.min.js") %>" type="text/javascript" charset="utf-8"></script>
An Independent IT Professional and Consultant on MS Technologies like .Net | MVC | Silverlight | Sharepoint | MS Project Server along with open source CMS Systems like DotNetNuke etc.
I am an enthusiastic technocrat who love to debug problems and solve them. I love writing articles on my website in my spare time. Please visit my Website for more details and subscribe to get technology related tips/tricks.