public HtmlBooleanAttributePropertyApplier(HtmlAttr attribute, bool defaultValue, String valueIfTrue, String valueIfFalse) { this.Attribute = attribute; this.DefaultValue = defaultValue; this.ValueIfTrue = valueIfTrue; this.ValueIfFalse = valueIfFalse; }
public void Add(HtmlAttr name, String value) { if (!String.IsNullOrEmpty(value)) { this[name] = value; } }
public void Remove(HtmlAttr attribute) { Remove(attribute.ToString().ToLower()); }
public String this[HtmlAttr attribute] { get { return(this[attribute.ToString().ToLower()]); } set { this[attribute.ToString().ToLower()] = value; } }
public static T ClearAttribute <T>(this T control, HtmlAttr attr) where T : HtmlObject { return(control.SetAttribute(attr, null)); }
public static T SetAttribute <T>(this T control, HtmlAttr attr, String value) where T : HtmlObject { return(control.SetAttribute(attr.ToString().ToLower(), value)); }
public HtmlAttributePropertyApplier(HtmlAttr attribute, Object defaultValue = null) { this.Attribute = attribute; this.DefaultValue = defaultValue; }