public static IHtmlContent TextBoxFieldFor <TModel, TValue>( this IHtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, Dictionary <string, object> htmlAttributes = null) { var metaData = html.GetMetaData(expression); return(html.FieldTemplate( html.QpTextBoxFor(expression, htmlAttributes), html.ModelExpressionProvider().GetExpressionText(expression), metaData.DisplayName, false, HtmlHelpersExtensions.GetExampleText(metaData.ContainerType, metaData.PropertyName))); }
public static MvcHtmlString TextBoxFieldFor <TModel, TValue>( this HtmlHelper <TModel> html, Expression <Func <TModel, TValue> > expression, Dictionary <string, object> htmlAttributes = null) { var metaData = html.GetMetaData(expression); return(MvcHtmlString.Create(string.Format( html.FieldTemplate(ExpressionHelper.GetExpressionText(expression), metaData.DisplayName, false, HtmlHelpersExtensions.GetExampleText(metaData.ContainerType, metaData.PropertyName)), html.QpTextBoxFor(expression, htmlAttributes).ToHtmlString() ))); }