Class Form
Generate a standard HTML5 <form> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Form : Tag<Form>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
Methods
| Improve this Doc View SourceAcceptCharset(String)
Set the accept-charset attribute on the <form> tag
Declaration
public Form AcceptCharset(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in accept-charset='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Action(String)
Set the action attribute on the <form> tag
Declaration
public Form Action(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in action='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Autocomplete(String)
Set the autocomplete attribute on the <form> tag
Declaration
public Form Autocomplete(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in autocomplete='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Enctype(String)
Set the enctype attribute on the <form> tag
Declaration
public Form Enctype(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in enctype='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Method(String)
Set the method attribute on the <form> tag
Declaration
public Form Method(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in method='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Name(String)
Set the name attribute on the <form> tag
Declaration
public Form 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 |
---|---|
Form | a Form object to enable fluid command chaining |
Novalidate()
Activate the novalidate attribute on the <form> tag
Declaration
public Form Novalidate()
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Novalidate(String)
Set the novalidate attribute on the <form> tag
Declaration
public Form Novalidate(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in novalidate='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |
Target(String)
Set the target attribute on the <form> tag
Declaration
public Form Target(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in target='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Form | a Form object to enable fluid command chaining |