Rushui Guan
Rushui Guan

Reputation: 3163

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 WebResourceAttribute 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?

Upvotes: 0

Views: 726

Answers (1)

Lukáš Novotný
Lukáš Novotný

Reputation: 9052

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

Upvotes: 1

Related Questions