Have you ever had a script tag in your code like this?:
<script type="text/javascript" src="@Url.Content("~/Scripts/myJavascriptLibrary.js")" />
What’s more, did you find that it was not actually loading when the page ran?
From what I’ve found out and seen is that you can’t load a javascript file using a self-closing Script tag. You must use an open tag/close tag scenario:
<script type="text/javascript" src="@Url.Content("~/Scripts/myJavascriptLibrary.js")" >
</script>
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.