protected override void AddAttributesToRender(HtmlTextWriter writer) { base.AddAttributesToRender(writer); if (DisableAutoConmplete) { writer.AddAttribute(HtmlTextWriterAttribute.AutoComplete, "off"); } string supportsVCard = Context.Request.Browser["supportsVCard"]; if (AutoCompleteType != AutoCompleteType.None && supportsVCard == "true") { writer.AddAttribute(HtmlTextWriterAttribute.VCardName, EnumDescriptionAttribute.ToString(AutoCompleteType)); } }
public void FromDescription(Pet pet, string expected) { string actual = EnumDescriptionAttribute.ToString(pet); Assert.AreEqual(expected, actual); }