Class Input
Generate a standard HTML5 <input> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Input : Tag<Input>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
Methods
| Improve this Doc View SourceAccept(String)
Set the accept attribute on the <input> tag
Declaration
public Input Accept(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in accept='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Alt(String)
Set the alt attribute on the <input> tag
Declaration
public Input Alt(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in alt='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Autocomplete(String)
Set the autocomplete attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Autofocus()
Activate the autofocus attribute on the <input> tag
Declaration
public Input Autofocus()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Autofocus(String)
Set the autofocus attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Checked()
Activate the checked attribute on the <input> tag
Declaration
public Input Checked()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Checked(String)
Set the checked attribute on the <input> tag
Declaration
public Input Checked(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in checked='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Dirname(String)
Set the dirname attribute on the <input> tag
Declaration
public Input Dirname(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in dirname='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Disabled()
Activate the disabled attribute on the <input> tag
Declaration
public Input Disabled()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Disabled(String)
Set the disabled attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Form(String)
Set the form attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Formaction(String)
Set the formaction attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Formenctype(String)
Set the formenctype attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Formmethod(String)
Set the formmethod attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Formnovalidate()
Activate the formnovalidate attribute on the <input> tag
Declaration
public Input Formnovalidate()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Formnovalidate(String)
Set the formnovalidate attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Formtarget(String)
Set the formtarget attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Height(String)
Set the height attribute on the <input> tag
Declaration
public Input Height(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in height='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
List(String)
Set the list attribute on the <input> tag
Declaration
public Input List(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in list='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Max(String)
Set the max attribute on the <input> tag
Declaration
public Input Max(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in max='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Maxlength(String)
Set the maxlength attribute on the <input> tag
Declaration
public Input Maxlength(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in maxlength='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Min(String)
Set the min attribute on the <input> tag
Declaration
public Input Min(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in min='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Multiple()
Activate the multiple attribute on the <input> tag
Declaration
public Input Multiple()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Multiple(String)
Set the multiple attribute on the <input> tag
Declaration
public Input Multiple(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in multiple='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Name(String)
Set the name attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Pattern(String)
Set the pattern attribute on the <input> tag
Declaration
public Input Pattern(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in pattern='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Placeholder(String)
Set the placeholder attribute on the <input> tag
Declaration
public Input Placeholder(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in placeholder='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Readonly()
Activate the readonly attribute on the <input> tag
Declaration
public Input Readonly()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Readonly(String)
Set the readonly attribute on the <input> tag
Declaration
public Input Readonly(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in readonly='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Required()
Activate the required attribute on the <input> tag
Declaration
public Input Required()
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Required(String)
Set the required attribute on the <input> tag
Declaration
public Input Required(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in required='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Size(String)
Set the size attribute on the <input> tag
Declaration
public Input Size(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in size='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Src(String)
Set the src attribute on the <input> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars
Declaration
public Input Src(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in src='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Step(String)
Set the step attribute on the <input> tag
Declaration
public Input Step(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in step='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |
Type(String)
Set the type attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Value(String)
Set the value attribute on the <input> tag
Declaration
public Input 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 |
---|---|
Input | a Input object to enable fluid command chaining |
Width(String)
Set the width attribute on the <input> tag
Declaration
public Input Width(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in width='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Input | a Input object to enable fluid command chaining |