embedded resource in MVC3
I am trying to create a mvc3 helper dll that contains some embedded resources such as scripts and css files. I want to access the embedded resource without using the WebResourceAttribu开发者_如何学运维te from the System.Web.UI library. It doesn't seem to belong.
I think a good approach is to create a controller and view to serve the embedded resource. I am not quite sure on the best way to implement this so that it can be project independent and reusable.
Any suggestions?
You can use GetManifestResourceStream and File action result. But keep in mind that those stylesheets and scripts are not going to be ediable without rebuilding assembly
精彩评论