I am trying to get the URL of some resources I embedded in a class library I made. There is one javascript and one css resource. I need to be able to add these to specific razor views so that is where I'd like to access them. If I can just get the correct URL for these resources then I should be fine.
I'm using MVC .Net Framework 4.5.2
What I've Tried
1
<script type="text/javascript" src="Default.Namespace.javascript.jsFile.js"></script>
result:
Unable to find file at the specified location http://localhost:12345/Default.Namespace.javascript.jsFile.js
2
<script type="text/javascript" src="@new FileStreamResult(Assembly.GetExecutingAssembly().GetManifestResourceStream("Defalut.Namespace.javascript.jsFile.js"), "text/javascript")"></script>
result:
<script type="text/javascript" src="System.Web.Mvc.FileStreamResult"></script>