public override bool OnAttributeChange(string property) { if (base.OnAttributeChange(property)) { return(true); } if (property == "selected") { string isSelected = this["selected"]; Selected = (string.IsNullOrEmpty(isSelected) || isSelected == "1" || isSelected == "true" || isSelected == "yes"); if (Dropdown != null) { // Tell the select: Dropdown.SetSelected(this); } return(true); } else if (property == "text") { // Write the innerHTML: innerHTML = this["text"]; return(true); } return(false); }
public override void OnChildrenLoaded() { // Get the dropdown: Dropdown=GetParentByTagName("select") as HtmlSelectElement; if(Selected && Dropdown!=null){ // Tell the select: Dropdown.SetSelected(this); } }