Reputation: 4869
I have HTML & CSS stored in different columns in a database row. I can use @Html.Raw(string)
to render my HTML, but how can I include the css style?
Upvotes: 0
Views: 285
Reputation: 4021
@Html.Raw(string s)
simply renders the provided string as an IHtmlString
in the view. All you need to do is provide it in a tag that can understand the rendered contents.
<style type="text/css>
@Html.Raw(style)
</style>
Upvotes: 1