Make a controller which serves the CSS content:
<link rel="stylesheet" href="@Url.Action("GetCss", "Serve", new {id="filename"})" />
Controller code:
public class ServeController: Controller
{
public ContentResult GetCss(string id)
{
string cssBody = GetCssBodyFromDatabase(id);
return Content(cssBody, "text/css");
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…