I have the following line:
<link href="<%= Links.Content.Site_css %>" rel="stylesheet" type="text/css" />
which is rendered to
<link href="Views/Shared/%3C%25=%20Links.Content.Site_css%20%25%3E" rel="stylesheet" type="text/css" />
So expression is not executed. If I remove quotes:
<link href=<%= Links.Content.Site_css %> rel="stylesheet" type="text/css" />
expression is executed but markup becomes xhtml incompatible. What is the right way to fix this problem?
Use single quotes instead of double quotes.
For that special case, I’d use
Csshelper method from MVC futures assembly: