开发者

How is other content besides views handled with PortableAreas from the MVCContrib library?

I have seen blog entries like ASP.Net MVC Portable Areas - Part 2 that indicate that the build action for views mu开发者_StackOverflow社区st be set to Embedded Resource.

What about other content such as images and CSS? Should they be set to Embedded Resource as well? Will the PortableArea ViewEngine pull that content out as well?


EDIT:

As long as your images/css/scripts are marked as Embedded Resources and follow the following convention:

> Areas
    > AreaName
        > Content
            > Styles
               Site.css
            > Images
               myImage.jpg
            > Scripts
               site.js

You get it for free! The routes generated to the embedded resources are:

~/AreaName/Styles/Site.css
~/AreaName/Images/myImage.jpg
~/AreaName/Scripts/site.js
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜