public HTMLSelectOption GetOptionByValue(string Value) { if (Children == null) { return(null); } foreach (DOMElement child in Children) { if (child is HTMLSelectOption) { HTMLSelectOption childOption = (HTMLSelectOption)child; if (childOption.Value == Value) { return(childOption); } } } return(null); }
public HTMLSelectOption GetSelectedOption() { if (Children == null) { return(null); } foreach (DOMElement child in Children) { if (child is HTMLSelectOption) { HTMLSelectOption childOption = (HTMLSelectOption)child; if (childOption.Selected) { return(childOption); } } } return(null); }