SelectElement

SelectElement class

The SelectElement represents a wrapper that is associated with the HTMLSelectElement

public class SelectElement : FormElement<HTMLSelectElement>

Properties

Name Description
ElementType { get; } Gets the type of the element.
HtmlElement { get; }
override Id { get; set; } Represents the Id attribute of the input element.
Multiple { get; set; } If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.
override Name { get; set; } Represent the name attribute of the input element.
Options { get; } Returns a list of options
SelectedOptions { get; } Returns a list of selected options
Type { get; } The type of this form control. This is the string “select-multiple” when the multiple attribute is true and the string “select-one” when false.
override Value { get; set; } On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.

Methods

Name Description
SelectItems(params int[]) This methods allows to select multiple options by their indexes.
SelectItems(params string[]) This methods allows to select multiple options by their values.

See Also