HtmlTextAreaElement Class
https://html.spec.whatwg.org/multipage/form-elements.html#htmltextareaelement
public sealed class HtmlTextAreaElement : HtmlElement- Inheritance
HtmlElementHtmlTextAreaElement
Properties
| Name | Description |
|---|---|
| Autocomplete | Gets or sets the value of the autocomplete content attribute. |
| Cols | Gets or sets the value of the cols content attribute. |
| DefaultValue | https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-defaultvalue |
| DirName | Gets or sets the value of the dirname content attribute. |
| Disabled | Gets or sets a value indicating whether the element has the disabled content attribute. |
| Form | Gets the form owner of the element, or null when it has none. |
| Labels | Gets the label elements associated with the element. |
| MaxLength | Gets or sets the value of the maxlength content attribute. |
| MinLength | Gets or sets the value of the minlength content attribute. |
| Name | Gets or sets the value of the name content attribute. |
| Placeholder | Gets or sets the value of the placeholder content attribute. |
| ReadOnly | Gets or sets a value indicating whether the element has the readonly content attribute. |
| Required | Gets or sets a value indicating whether the element has the required content attribute. |
| Rows | Gets or sets the value of the rows content attribute. |
| SelectionDirection | Gets or sets the direction of the text selection (forward, backward or none). |
| SelectionEnd | Gets or sets the index of the end of the text selection. |
| SelectionStart | Gets or sets the index of the start of the text selection. |
| TextLength | Gets the length of the value of the control, in UTF-16 code units. |
| Type | Gets the type of the control, always textarea. |
| ValidationMessage | Gets the error message that would be shown to the user if the element is invalid, or an empty string. |
| Validity | Gets the ValidityState object that describes the validity of the element. |
| Value | https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-value |
| WillValidate | Gets a value indicating whether the element is a candidate for constraint validation. |
| Wrap | Gets or sets the value of the wrap content attribute. |
Autocomplete
HtmlElements.g.csGets or sets the value of the autocomplete content attribute.
public string Autocomplete { get; set; }Gets or sets the value of the cols content attribute.
public uint Cols { get; set; }Property value
See also
DefaultValue
HtmlTextAreaElement.cshttps://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-defaultvalue
public string DefaultValue { get; set; }DirName
HtmlElements.g.csGets or sets the value of the dirname content attribute.
public string DirName { get; set; }Property value
See also
Disabled
HtmlElements.g.csGets or sets a value indicating whether the element has the disabled content attribute.
public bool Disabled { get; set; }Property value
See also
Gets the form owner of the element, or null when it has none.
public HtmlFormElement? Form { get; }Labels
FormControlMembers.csGets the label elements associated with the element.
public NodeList Labels { get; }MaxLength
HtmlElements.g.csGets or sets the value of the maxlength content attribute.
public int MaxLength { get; set; }Property value
See also
MinLength
HtmlElements.g.csGets or sets the value of the minlength content attribute.
public int MinLength { get; set; }Property value
See also
Gets or sets the value of the name content attribute.
public string Name { get; set; }Property value
See also
Placeholder
HtmlElements.g.csGets or sets the value of the placeholder content attribute.
public string Placeholder { get; set; }Property value
See also
ReadOnly
HtmlElements.g.csGets or sets a value indicating whether the element has the readonly content attribute.
public bool ReadOnly { get; set; }Property value
See also
Required
HtmlElements.g.csGets or sets a value indicating whether the element has the required content attribute.
public bool Required { get; set; }Property value
See also
Gets or sets the value of the rows content attribute.
public uint Rows { get; set; }Property value
See also
SelectionDirection
HtmlTextAreaElement.csGets or sets the direction of the text selection (forward, backward or none).
public string SelectionDirection { get; set; }SelectionEnd
HtmlTextAreaElement.csGets or sets the index of the end of the text selection.
public uint SelectionEnd { get; set; }SelectionStart
HtmlTextAreaElement.csGets or sets the index of the start of the text selection.
public uint SelectionStart { get; set; }TextLength
HtmlTextAreaElement.csGets the length of the value of the control, in UTF-16 code units.
public uint TextLength { get; }Property value
See also
ValidationMessage
FormControlMembers.csGets the error message that would be shown to the user if the element is invalid, or an empty string.
public string ValidationMessage { get; }Validity
FormControlMembers.csGets the ValidityState object that describes the validity of the element.
public ValidityState Validity { get; }https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-value
public string Value { get; set; }Property value
See also
WillValidate
FormControlMembers.csGets a value indicating whether the element is a candidate for constraint validation.
public bool WillValidate { get; }Gets or sets the value of the wrap content attribute.
public string Wrap { get; set; }Property value
See also
Methods
| Name | Description |
|---|---|
| CheckValidity() | Returns whether the element satisfies its constraints, firing an invalid event when it does not. |
| ReportValidity() | Checks whether the element satisfies its constraints, firing an invalid event when it does not. |
| Select() | Selects all the text of the control. |
| SetCustomValidity(string) | Sets the custom validity error message of the element; an empty string clears the custom error. |
| SetRangeText(string) | Replaces the selected text with the given text. |
| SetRangeText(string, uint, uint, string) | Replaces the text between the start and end indexes with the given text and updates the selection according to the selection mode. |
| SetSelectionRange(uint, uint, string?) | Selects the text between the start and end indexes, with the given direction. |
CheckValidity()
FormControlMembers.csReturns whether the element satisfies its constraints, firing an invalid event when it does not.
public bool CheckValidity()ReportValidity()
FormControlMembers.csChecks whether the element satisfies its constraints, firing an invalid event when it does not.
public bool ReportValidity()Select()
HtmlTextAreaElement.csSelects all the text of the control.
public void Select()SetCustomValidity(string)
FormControlMembers.csSets the custom validity error message of the element; an empty string clears the custom error.
SetRangeText overloads
SetRangeText(string)
HtmlTextAreaElement.csReplaces the selected text with the given text.
SetRangeText(string, uint, uint, string)
HtmlTextAreaElement.csSetSelectionRange(uint, uint, string?)
HtmlTextAreaElement.csSelects the text between the start and end indexes, with the given direction.