Is it possible to link the value with the Application Settings file directly to the CSS stylesheet?

I wanted to know if it is possible to refer to the value of my "appSetting" file directly in the ".css" stylesheet? eg:

body { background-color: <%$ AppSettings:myColorValue %>; } 

It's just beautiful ^^ Thank you very much

+4
source share
2 answers

Out of the box, the ASP script ISAPI engine only processes files supported by supported extensions ( .asp ). In addition, .css files are static and are usually cached by the browser.

You can move the body style to the <style> in your .asp code (for example, in #include ), where it will deal with the engine.

+4
source

No, you canโ€™t. The application settings file is specific to ASP.Net, CSS files are not.

However, you can define your own token scheme and return a processed, de-wedged file, which is then cached.

+1
source

Source: https://habr.com/ru/post/1447462/


All Articles