public ActionResult Index() { return View("ViewName"); // cshtml file name } That is normally works.
public ActionResult Index() { string razor = "<p>Date: @DateTime.Now</p>"; return View(razor); } Can I do something like that? Not render a .cshtml file, render a string...
-- Edit------
I actually create .cshtml files programmatically. For example i gonna use @Html.TextBoxFor(...) or foreach statement in my string. – E-D just now edit