Class TextBox
Inheritance
Namespace: Syncfusion.EJ2.Inputs
Assembly: Syncfusion.EJ2.dll
Syntax
public class TextBox : EJTagHelper
Constructors
TextBox()
Declaration
public TextBox()
Properties
Autocomplete
Specifies whether the browser is allow to automatically enter or select a value for the textbox.
By default, autocomplete is enabled for textbox.
Possible values are:
on
- Specifies that autocomplete is enabled.
off
- Specifies that autocomplete is disabled.
Declaration
public string Autocomplete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "on" |
Blur
Triggers when the TextBox has focus-out.
Declaration
public string Blur { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Change
Triggers when the content of TextBox has changed and gets focus-out.
Declaration
public string Change { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Created
Triggers when the TextBox component is created.
Declaration
public string Created { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
CssClass
Specifies the CSS class value that is appended to wrapper of Textbox.
Declaration
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Destroyed
Triggers when the TextBox component is destroyed.
Declaration
public string Destroyed { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Enabled
Specifies a Boolean value that indicates whether the TextBox allow user to interact with it.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnablePersistence
Enable or disable persisting TextBox state between page reloads. If enabled, the value
state will be persisted.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
FloatLabelType
Specifies the floating label behavior of the TextBox that the placeholder text floats above the TextBox based on the below values.
Possible values are:
Never
- The placeholder text should not be float ever.
Always
- The placeholder text floats above the TextBox always.
Auto
- The placeholder text floats above the TextBox while focusing or enter a value in Textbox.
Declaration
public FloatLabelType FloatLabelType { get; set; }
Property Value
Type | Description |
---|---|
FloatLabelType | The default value is FloatLabelType.Never |
Focus
Triggers when the TextBox gets focus.
Declaration
public string Focus { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
For
Declaration
public override ModelExpression For { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression |
Overrides
HtmlAttributes
You can add the additional html attributes such as disabled, value etc., to the element. If you configured both property and equivalent html attribute then the component considers the property value.
Declaration
public object HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
Input
Triggers each time when the value of TextBox has changed.
Declaration
public string Input { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Multiline
Specifies a boolean value that enable or disable the multiline on the TextBox. The TextBox changes from single line to multiline when enable this multiline mode.
Declaration
public bool Multiline { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Placeholder
Specifies the text that is shown as a hint/placeholder until the user focus or enter a value in Textbox. The property is depending on the floatLabelType property.
Declaration
public string Placeholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Readonly
Specifies the boolean value whether the TextBox allows user to change the text.
Declaration
public bool Readonly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ShowClearButton
Specifies a Boolean value that indicates whether the clear button is displayed in Textbox.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Type
Specifies the behavior of the TextBox such as text, password, email, etc.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "text" |
Value
Sets the content of the TextBox.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Width
Specifies the width of the Textbox component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |