Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }