I am trying to dynamically render pages from database. The view looks like this
@model MyModel
@{
ViewBag.Title = Model.Title;
Layout = Layout = "~/Views/Shared/_PageInnerLayout.cshtml";
}
@MvcHtmlString.Create(Model.Content)
MyModel has just 3 properties; Id, Title and Content
If the Content has just HTML, the view renders just fine. But in some cases, I need to render partials too. So Content may contain code like
@{
Html.RenderPartial("_FooterPartial");
}
This does not work. Its being rendered literally, like shown in the image below

How do I fix this so that the page is rendered properly?
IsPartialContentto model, and if it is true then render partial manualy, also you can see on razorgeneratorrenderpartialwith no other html code@MvcHtmlString.Createput string in output as is, so if you want put not only html you must process yourModel.Contentfor example in razor engine, and output result string