Back to Devexpress

Text Box

aspnetcore-400813-devextreme-based-controls-controls-text-box.md

latest5.8 KB
Original Source

Text Box

  • Mar 24, 2026
  • 2 minutes to read

Text Box is a UI component that allows users to enter and edit a single line of text.

Run Demo: Text Box Read Tutorial

Getting Started

The Text Box UI Control is based on the DevExtreme Text Box component.

To add this control to your project, follow instructions in the following help topics:

Basic Syntax

cshtml
@(Html.DevExtreme().TextBox()
    .Placeholder("Enter text here...")
)
cshtml
using Microsoft.AspNetCore.Mvc;

namespace ASP_NET_Core.Controllers {
    public class TextBoxController : Controller {
        public IActionResult GettingStarted() {
            return View();
        }
    }
}

Built-in Capabilities and Configuration Guides

API

Server-Side API

InitializationCall the TextBox() method to create a Text Box control. This action initializes a TextBoxBuilder instance. Use the instance methods to specify Text Box options and event handlers.OptionsFor a complete option list, see Options. For details on how to specify control options, refer to the following help topic: Specify Options.EventsFor available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.

Client-Side API

OptionsIf you need to specify the Text Box options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme Text Box options.MethodsFor a list of available methods, see DevExtreme Text Box methods. For details on how to call methods, refer to the following help topic: Call Methods.

Accessibility

For more information on Text Box accessibility compliance, refer to the following help topic: Accessibility.

Demos

Run Demo: Text Box

See Also

Text Box - Online Demo