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 メソッドが含まれていません。どうすればこれを解決できますか?