For ASP.NET 4 code:
MvcHtmlString html =
System.Web.Mvc.Html.InputExtensions.TextBoxFor(
htmlHelper, expression);
ASP.NET 5 equivalent:
Microsoft.AspNet.Mvc.Rendering.HtmlString html =
(Microsoft.AspNet.Mvc.Rendering.HtmlString)
Microsoft.AspNet.Mvc.Rendering.HtmlHelperInputExtensions.TextBoxFor(
htmlHelper, expression);
or with the namespace included on your page
@Microsoft.AspNet.Mvc.Rendering;
he reads:
HtmlString html = (HtmlString)HtmlHelperInputExtensions.TextBoxFor(htmlHelper,expression);
Note that its return type is an interface IHtmlContent, and not MvcHtmlStringlike in ASP.NET 4.
MvcHtmlStringhas been replaced by HtmlStringin ASP.NET 5.
Since the interface is returned IHtmlContentfrom HtmlString, rather than HtmlString, you need to give an answer toHtmlString
ASP.NET 5
IHtmlContent :
IHtmlContent html = HtmlHelperInputExtensions.TextBoxFor(htmlHelper,
expression);
return html;
.