App_themes css files and version number

I would like to have the version number added to the css file located in my app_themes folder on my asp.net website, so modifying the file will force the browser to get the file from the server instead of using one in the cache.

css output path will look like ~ / app_themes / blue / blue.css? v = 1234

Any idea how this can be done without having to manually edit the file name?

+4
source share
2 answers

I would try something like this

<link rel="stylesheet" href="/app_themes/blue/blue.css?v=<%=Global.VERSION_NUM%>"> 

Do this with all your CSS links, and then when you do the deployment on your live site, you can just change the constant VERSION_NUM

+5
source

A more detailed solution is available here:
Add url parameter to css file in asp themes folder

+7
source

All Articles