我能否以其他方式从控制器返回原始HTML?而不仅仅是使用ViewBag,如下所示:
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.HtmlOutput = "<HTML></HTML>";
return View();
}
}
@{
ViewBag.Title = "Index";
}
@Html.Raw(ViewBag.HtmlOutput)