Class TextBox
Inheritance
System.Object
TextBox
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ2.dll
Syntax
public class TextBox : EJTagHelper
Constructors
TextBox()
Declaration
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
[HtmlAttributeName("autocomplete")]
public string Autocomplete { get; set; }
Property Value
Type |
Description |
System.String |
|
Blur
Triggers when the TextBox has focus-out.
Declaration
[HtmlAttributeName("blur")]
public string Blur { get; set; }
Property Value
Type |
Description |
System.String |
|
Change
Triggers when the content of TextBox has changed and gets focus-out.
Declaration
[HtmlAttributeName("change")]
public string Change { get; set; }
Property Value
Type |
Description |
System.String |
|
ClassName
Declaration
protected override string ClassName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Created
Triggers when the TextBox component is created.
Declaration
[HtmlAttributeName("created")]
public string Created { get; set; }
Property Value
Type |
Description |
System.String |
|
CssClass
Specifies the CSS class value that is appended to wrapper of Textbox.
Declaration
[HtmlAttributeName("cssClass")]
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
Destroyed
Triggers when the TextBox component is destroyed.
Declaration
[HtmlAttributeName("destroyed")]
public string Destroyed { get; set; }
Property Value
Type |
Description |
System.String |
|
Enabled
Specifies a Boolean value that indicates whether the TextBox allow user to interact with it.
Declaration
[HtmlAttributeName("enabled")]
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePersistence
Enable or disable persisting TextBox state between page reloads. If enabled, the value
state will be persisted.
Declaration
[HtmlAttributeName("enablePersistence")]
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
[HtmlAttributeName("enableRtl")]
public bool EnableRtl { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
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
[HtmlAttributeName("floatLabelType")]
public FloatLabelType FloatLabelType { get; set; }
Property Value
Focus
Triggers when the TextBox gets focus.
Declaration
[HtmlAttributeName("focus")]
public string Focus { get; set; }
Property Value
Type |
Description |
System.String |
|
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.
{% codeBlock src='textbox/htmlAttributes/index.md' %}{% endcodeBlock %}
Declaration
[HtmlAttributeName("htmlAttributes")]
public object HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Object |
|
Input
Triggers each time when the value of TextBox has changed.
Declaration
[HtmlAttributeName("input")]
public string Input { get; set; }
Property Value
Type |
Description |
System.String |
|
IsFor
Declaration
protected override bool IsFor { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
[HtmlAttributeName("locale")]
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
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
[HtmlAttributeName("multiline")]
public bool Multiline { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
NameSpace
Declaration
protected override string NameSpace { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
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
[HtmlAttributeName("placeholder")]
public string Placeholder { get; set; }
Property Value
Type |
Description |
System.String |
|
Readonly
Specifies the boolean value whether the TextBox allows user to change the text.
Declaration
[HtmlAttributeName("readonly")]
public bool Readonly { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowClearButton
Specifies a Boolean value that indicates whether the clear button is displayed in Textbox.
Declaration
[HtmlAttributeName("showClearButton")]
public bool ShowClearButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TagName
Declaration
protected override string TagName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Type
Specifies the behavior of the TextBox such as text, password, email, etc.
Declaration
[HtmlAttributeName("type")]
public string Type { get; set; }
Property Value
Type |
Description |
System.String |
|
Value
Sets the content of the TextBox.
Declaration
[HtmlAttributeName("value")]
public string Value { get; set; }
Property Value
Type |
Description |
System.String |
|
Width
Specifies the width of the Textbox component.
Declaration
[HtmlAttributeName("width")]
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|