HtmlOutputElement Class
https://html.spec.whatwg.org/multipage/form-elements.html#htmloutputelement
public sealed class HtmlOutputElement : HtmlElement- Inheritance
HtmlElementHtmlOutputElement
Properties
| Name | Description |
|---|---|
| DefaultValue | https://html.spec.whatwg.org/multipage/form-elements.html#dom-output-defaultvalue |
| Form | Gets the form owner of the element, or null when it has none. |
| HtmlFor | Gets the tokens of the for content attribute. |
| Labels | Gets the label elements associated with the element. |
| Name | Gets or sets the value of the name content attribute. |
| Type | Gets the type of the control, always output. |
| 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-output-value |
| WillValidate | Gets a value indicating whether the element is a candidate for constraint validation. |
DefaultValue
SimpleControls.cshttps://html.spec.whatwg.org/multipage/form-elements.html#dom-output-defaultvalue
public string DefaultValue { get; set; }Property value
See also
Gets the form owner of the element, or null when it has none.
public HtmlFormElement? Form { get; }HtmlFor
HtmlElements.g.csGets the tokens of the for content attribute.
public DomTokenList HtmlFor { get; }Property value
See also
Labels
FormControlMembers.csGets the label elements associated with the element.
public NodeList Labels { get; }Gets or sets the value of the name content attribute.
public string Name { get; set; }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; }Value
SimpleControls.cshttps://html.spec.whatwg.org/multipage/form-elements.html#dom-output-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; }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. |
| SetCustomValidity(string) | Sets the custom validity error message of the element; an empty string clears the custom error. |
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()SetCustomValidity(string)
FormControlMembers.csSets the custom validity error message of the element; an empty string clears the custom error.