我有以下行:ASP.NET MVC表達呈現 「原樣」
<link href="<%= Links.Content.Site_css %>" rel="stylesheet" type="text/css" />
其被渲染到
<link href="Views/Shared/%3C%25=%20Links.Content.Site_css%20%25%3E" rel="stylesheet" type="text/css" />
所以不執行表達式。如果我刪除引號:
<link href=<%= Links.Content.Site_css %> rel="stylesheet" type="text/css" />
表達式被執行但標記變成xhtml不兼容。什麼是解決這個問題的正確方法?