asp.net mvc - Static Content on Development and Production Envoirnment -
i using asp.net mvc 2 build web application. question regarding static content. in production, static content residing @ sub domain http://static.jobsora.com/content/css/. while, in development residing @ default location of ../content/css/. example:
for production:
<link rel="stylesheet" type="text/css" href="http://static.jobsora.com/content/css/search-min.css" />
for development:
<link rel="stylesheet" type="text/css" href="<%= url.content("~/content/css/search-min.css") %>" />
i know change of codebase production not @ approach. so, looking better approach. think can trick down absolute url, how? no idea!
thanks.
consider programmably adding links page adding link elements head. can done code-behind, , work around way using:
#if debug #else #endif
or other construct.
hth.
Comments
Post a Comment