I have to say: this is another question:
I want to provide dynamic .cshtml content from db when I want.
Example:
City table, FreeHtml column
@model City
@ Html.CheckBox - @ Model.Name - @ Html.CustomHelper
How can I write an html helper:
@model City @Html.RazorRaw(Model.FreeHtml,Model)
or as CustomViewResult
public RazorPartialViewResult CityHtml(City city) { return new RazorPartialViewResult(city.FreeHtml,city) }
source share