public static void AddWidthAttribute(IDictionary <string, object> attributes, ControlSizesEnum type) { if (!attributes.ContainsKey("width")) { attributes.Add("width", ""); } }
public static MvcHtmlString TextBoxDirectiveFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, object htmlAttributes = null, NgModelPathOptions ngModelPathOptions = null, ControlSizesEnum type = ControlSizesEnum.Medium, bool isTextArea = false) { var attributes = (IDictionary <string, object>)HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes); AttributeManager.AddTitleAttribute(attributes); string name = ExpressionHelper.GetExpressionText(expression); AttributeManager.AddNgModelAttribute(attributes, name, ngModelPathOptions); if (isTextArea) { return(htmlHelper.TextAreaFor(expression, attributes)); } return(htmlHelper.TextBoxFor(expression, attributes)); }