menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MaskedTextBox - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MaskedTextBox

    Inheritance
    System.Object
    Syncfusion.EJ2.EJTagHelper
    MaskedTextBox
    Namespace: Syncfusion.EJ2.Inputs
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class MaskedTextBox : EJTagHelper

    Constructors

    MaskedTextBox()

    Declaration
    public MaskedTextBox()

    Properties

    Blur

    Triggers when the MaskedTextBox got focus out.

    Declaration
    public string Blur { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Change

    Triggers when the value of the MaskedTextBox changes.

    Declaration
    public string Change { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Created

    Triggers when the MaskedTextBox component is created.

    Declaration
    public string Created { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CssClass

    Gets or sets the CSS classes to root element of the MaskedTextBox which helps to customize the complete UI styles for the MaskedTextBox component.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    CustomCharacters

    Declaration
    public object CustomCharacters { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null

    Destroyed

    Triggers when the MaskedTextBox component is destroyed.

    Declaration
    public string Destroyed { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Enabled

    Sets a value that enables or disables the MaskedTextBox component.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true

    EnablePersistence

    Sets a value that enables or disables the persisting state of the MaskedTextBox after reloading the page. 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

    The acts as a label and floats above the MaskedTextBox based on the below values. Possible values are: Never - The floating label will not be enable when the placeholder is available. Always - The floating label always floats above the MaskedTextBox. Auto - The floating label floats above the MaskedTextBox after focusing it or when enters the value in it.

    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type Description
    FloatLabelType

    The default value is FloatLabelType.Never

    Focus

    Triggers when the MaskedTextBox got focus in.

    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
    Syncfusion.EJ2.EJTagHelper.For

    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

    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 ""

    Mask

    Declaration
    public string Mask { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Placeholder

    Gets or sets the string shown as a hint/placeholder when the MaskedTextBox is empty. It acts as a label and floats above the MaskedTextBox based on the

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    PromptChar

    Declaration
    public string PromptChar { get; set; }
    Property Value
    Type Description
    System.String

    The default value is "_"

    Readonly

    Specifies the boolean value whether the Masked TextBox allows the user to change the text.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    ShowClearButton

    Specifies whether to show or hide the clear icon.

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false

    Value

    Gets or sets the value of the MaskedTextBox. It is a raw value of the MaskedTextBox excluding literals and prompt characters. By using getMaskedValue property, you can get the value of MaskedTextBox with the masked format.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Width

    Sets the width of the MaskedTextBox.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved