menu

ASP.NET MVC - EJ2

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

    Show / Hide Table of Contents

    Class OtpInput

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

    Constructors

    OtpInput()

    Declaration
    public OtpInput()

    Properties

    AriaLabels

    Defines the ARIA-label attribute for each input field in the Otp (One-Time Password) input component. Each string in the array corresponds to the ARIA-label attribute for each input field.

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

    The default value is null

    AutoFocus

    Specifies whether the OTP input field should automatically receive focus when the component is rendered.

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

    The default value is false

    Blur

    Event triggers when the Otp input is focused out.

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

    The default value is null

    Created

    Event triggers after the creation of the Otp Input.

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

    The default value is null

    CssClass

    Defines one or more CSS classes that can be used to customize the appearance of the Otp (One-Time Password) input component.

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

    The default value is ""

    Disabled

    Specifies whether the Otp input component is disabled. When set to true, the component is disabled and user input is not allowed.

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

    The default value is false

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    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

    Focus

    Event triggers when the Otp input is focused.

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

    The default value is null

    HtmlAttributes

    Specifies additional HTML attributes to be applied to the Otp (One-Time Password) input component.

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

    The default value is null

    Input

    Event triggers each time when the value of each Otp input is changed.

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

    The default value is null

    Length

    Specifies the length of the Otp (One-Time Password) to be entered by the user. This determines the number of input fields in the Otp Input.

    Declaration
    public double Length { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 4

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

    Placeholder

    Specifies the text that is shown as a hint/placeholder until the user focuses on or enters a value in the Otp Input. If a single text is provided, it will be used for all input fields; otherwise, each text letter will be used for each field.

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

    The default value is ""

    Separator

    Specifies the separator used to separate each input field in the Otp Input component. The separator is displayed between each input field.

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

    The default value is ""

    StylingMode

    Specifies the style variant for the input fields in the Otp Input component.

    Declaration
    public OtpInputStyle StylingMode { get; set; }
    Property Value
    Type Description
    OtpInputStyle

    The default value is OtpInputStyle.Outlined

    TextTransform

    Specifies the case transformation for the OTP input text.

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

    The default value is TextTransform.None

    Type

    Specifies the input type of the Otp.

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

    The default value is OtpInputType.Number

    Value

    Specifies the value of the Otp (One-Time Password) input. This can be a string or a number, representing the Otp value entered by the user.

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

    The default value is ""

    ValueChanged

    Event triggers after the value is changed and the Otp input is focused out.

    Declaration
    public string ValueChanged { 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