2

I'm embedding a javascript file as a resource in an assembly. How do I load javascript file in Asp.Net MVC project?

4
  • 1
    You read the (entire) text and render it in your page. Commented Oct 7, 2014 at 7:41
  • 2
    Another way, Embed javascript to your assembly as a resource then you can use this as assembly reference. like this [assembly: System.Web.UI.WebResource("<full assemblyname>.<you javascriptfile.js>", "application/x-javascript")] Commented Oct 7, 2014 at 7:51
  • 1
    I'm read the article: link(codeproject.com/Articles/196727/…). I want to load js file before render body in the _Layout.cshtml Commented Oct 7, 2014 at 8:20
  • 2
    I got the solution link Commented Oct 9, 2014 at 2:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.