Class Option
Generate a standard HTML5 <option> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Option : Tag<Option>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
Methods
| Improve this Doc View SourceDisabled()
Activate the disabled attribute on the <option> tag
Declaration
public Option Disabled()
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |
Disabled(String)
Set the disabled attribute on the <option> tag
Declaration
public Option Disabled(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in disabled='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |
Label(String)
Set the label attribute on the <option> tag
Declaration
public Option Label(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in label='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |
Selected()
Activate the selected attribute on the <option> tag
Declaration
public Option Selected()
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |
Selected(String)
Set the selected attribute on the <option> tag
Declaration
public Option Selected(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in selected='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |
Value(String)
Set the value attribute on the <option> tag
Declaration
public Option Value(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in value='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Option | a Option object to enable fluid command chaining |