开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜