是否等效于ASP.NET 5中的MvcHtmlString? [英] Equivalent for MvcHtmlString in ASP.NET 5?
问题描述
ASP.NET 5中是否有MvcHtmlString的等效项? 否则,我们如何才能正确呈现自定义HTMLHelper方法的HTML输出?
不再需要MvcHtmlString
(出于兼容性原因将其添加到HtmlString
之上),因此您可以简单地使用Microsoft.AspNet.Mvc.Rendering.HtmlString
.>
您可以很容易地注意到,Asp.Net 5的ViewComponents和Helpers也在视图中使用(通过返回)相同的HtmlString
.
Is there an equivalent for MvcHtmlString in ASP.NET 5 ? Otherwise, how can we render HTML output from my custom HTMLHelper method properly ?
There is no longer need for MvcHtmlString
(which added on top of HtmlString
for compatibility reasons) so you can simply use Microsoft.AspNet.Mvc.Rendering.HtmlString
.
As you can easily notice, the ViewComponents and Helpers of Asp.Net 5 are also using (by returning) the same HtmlString
to the views.
这篇关于是否等效于ASP.NET 5中的MvcHtmlString?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!