Class SelectElement
Namespace: Aspose.Html.Forms
Assembly: Aspose.HTML.dll (25.2.0)
The SelectElement represents a wrapper that is associated with the HTMLSelectElement
[ComVisible(true)]
public class SelectElement : FormElement<htmlselectelement>
Inheritance
object ← FormElement ← FormElement<htmlselectelement> ← SelectElement
Inherited Members
FormElement<htmlselectelement>.HtmlElement, FormElement.ElementType, FormElement.Name, FormElement.Id, FormElement.Value, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
Id
Represents the Id attribute of the input element.
public override string Id { get; set; }
Property Value
Multiple
If true, multiple OPTION
elements may be selected in this SELECT
. See the multiple attribute definition in HTML 4.01.
public bool Multiple { get; set; }
Property Value
Name
Represent the name attribute of the input element.
public override string Name { get; set; }
Property Value
Options
Returns a list of options
public OptionCollection Options { get; }
Property Value
SelectedOptions
Returns a list of selected options
public IList<string> SelectedOptions { get; }
Property Value
Type
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
.
public string Type { get; }
Property Value
Value
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.
public override string Value { get; set; }
Property Value
Methods
SelectItems(params int[])
This methods allows to select multiple options by their indexes.
public void SelectItems(params int[] indexes)
Parameters
indexes
int[]
An array of indexes for parameter selection.
SelectItems(params string[])
This methods allows to select multiple options by their values.
public void SelectItems(params string[] values)
Parameters
values
string[]
An array of values for parameter selection. </htmlselectelement></htmlselectelement>