开发者

asp.net static content in separate project. now how to refer?

开发者 https://www.devze.com 2023-03-08 05:09 出处:网络
Project1.csproj is the website project and StaticContent.csproj is the static content project to hold all .css, .js and image files. I am keeping it separate so that designers can work without touchin

Project1.csproj is the website project and StaticContent.csproj is the static content project to hold all .css, .js and image files. I am keeping it separate so that designers can work without touching the main project file and may be use cdn in future. But the problem is how do my .ascx and .aspx pages will refer to these css an开发者_如何学God js files as that when I run in localhost, it still picks up.


I think the best way is you create a website in IIS for the Static project, and reference it trough something like static.myproject.com (having the appropiate setup) on the other one.

You can still use Webdevserver on Project1.

Is most like what you will have when deploy, and you can put the URL on web.config for easy change

0

精彩评论

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

关注公众号