我知道如何扩展 TextBoxFor :
public static MvcHtmlString TextBoxFor<TModel, TValue>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TValue>> expression, object htmlAttributes)
{
MvcHtmlString html = default(MvcHtmlString);
RouteValueDictionary routeValues = new RouteValueDictionary(htmlAttributes);
html = System.Web.Mvc.Html.InputExtensions.TextBoxFor(htmlHelper, expression, routeValues);
return html;
}
我想为 TextAreaFor 做同样的事情,但不幸的是System.Web.Mvc.Html.InputExtensions不包含 TextAreaFor 方法。我该如何解决这个问题?