I have to say: This is a different question from these:
http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/
ASP.NET MVC Razor: How to render a Razor Partial View's HTML inside the controller action
http://blog.rocketbase.co.uk/2011/04/asp-net-mvc-virtual-path-provider/
ASP.NET MVC load Razor view from database
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 as html helper:
@model City
@Html.RazorRaw(Model.FreeHtml,Model)
or as CustomViewResult
public RazorPartialViewResult CityHtml(City city)
{
return new RazorPartialViewResult(city.FreeHtml,city)
}