Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我可以将 HTML 和 JavaScript 放入单独的项目中,然后通过从另一个项目的上下文中的 dll 中提取代码来访问代码。
但是,我该如何访问放在 dll 中的代码呢?
这样做的目的是为了分发模块。我正在使用 MVC 3。
我假设您将它作为嵌入式资源添加到项目中。
你可以写typeof(MyType).Assembly.GetManifestResourceStream("Folder.File.js")
typeof(MyType).Assembly.GetManifestResourceStream("Folder.File.js")