Class Button
Generate a standard HTML5 <button> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Button : Tag<Button>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
  Methods
| Improve this Doc View SourceAutofocus()
Activate the autofocus attribute on the <button> tag
Declaration
public Button Autofocus()
  Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Autofocus(String)
Set the autofocus attribute on the <button> tag
Declaration
public Button Autofocus(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in autofocus='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Disabled()
Activate the disabled attribute on the <button> tag
Declaration
public Button Disabled()
  Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Disabled(String)
Set the disabled attribute on the <button> tag
Declaration
public Button 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 | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Form(String)
Set the form attribute on the <button> tag
Declaration
public Button Form(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in form='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formaction(String)
Set the formaction attribute on the <button> tag
Declaration
public Button Formaction(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in formaction='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formenctype(String)
Set the formenctype attribute on the <button> tag
Declaration
public Button Formenctype(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in formenctype='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formmethod(String)
Set the formmethod attribute on the <button> tag
Declaration
public Button Formmethod(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in formmethod='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formnovalidate()
Activate the formnovalidate attribute on the <button> tag
Declaration
public Button Formnovalidate()
  Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formnovalidate(String)
Set the formnovalidate attribute on the <button> tag
Declaration
public Button Formnovalidate(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in formnovalidate='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Formtarget(String)
Set the formtarget attribute on the <button> tag
Declaration
public Button Formtarget(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in formtarget='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Name(String)
Set the name attribute on the <button> tag
Declaration
public Button Name(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in name='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Type(String)
Set the type attribute on the <button> tag
Declaration
public Button Type(string value)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | what should be in type='...'. If called multiple times, later values replace the previous value.  | 
      
Returns
| Type | Description | 
|---|---|
| Button | a Button object to enable fluid command chaining  | 
      
Value(String)
Set the value attribute on the <button> tag
Declaration
public Button 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 | 
|---|---|
| Button | a Button object to enable fluid command chaining  |