javascript.netclrwebresource.axd

How to retrieve Javascript/HTML in CLR


I know I can put HTML and JavaScript into a separate projects and then access the code by pulling it from the dll from the context of another project.

But, how do I go about accessing the code that was put in the dll?

The purpose of this is for distributing modules. I'm using MVC 3.


Solution

  • I assume that you added it to the project as an embedded resource.

    You can write typeof(MyType).Assembly.GetManifestResourceStream("Folder.File.js")