.NET MVC3中输出Html标签 Posted on 2016/10/23 1:56:27 C# By 王佳亮 控制器: ViewBag.Message = "< h 1 >欢迎使用 ASP.NET MVC!< / h 1>"; 视图: @Html.Raw(ViewBag.Message) @MvcHtmlString.Create(ViewBag.Message) @{WriteLiteral(ViewBag.Message);} @(new HtmlString(ViewBag.Message))