TextBox HtmlHelper Overview

The Telerik UI TextBox HtmlHelper for ASP.NET Core is a server-side wrapper for the Kendo UI TextBox widget.

The TextBox provides a set of default API configuration options that can be set during its initialization such as value, placeholder, and so on.

Telerik UI for ASP.NET Core Ninja image

The TextBox is part of Telerik UI for ASP.NET Core, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Basic Configuration

The following example demonstrates the basic configuration for the TextBox.

        .Name("textbox") // The name of the TextBox is mandatory. It specifies the "id" attribute of the TextBox.
        .Value("John Doe") // Set the value of the TextBox.

Functionality and Features


You can subscribe to the TextBox events. For a complete example on basic TextBox events, refer to the demo on using the events of the TextBox.

The following example demonstrates how to subscribe to events by a handler name.

        .Events(e => e
  function textbox_change() {
      // Handle the change event.

Referencing Existing Instances

To reference an existing Telerik UI TextBox instance, use the jQuery.data() method. Once a reference is established, use the TextBox client-side API to control its behavior.

The following example demonstrates how to access an existing TextBox instance.

  // Place the following after your Telerik UI TextBox for ASP.NET Core declaration.
  $(function() {
      // The Name() of the TextBox is used to get its client-side instance.
      var textbox = $("#textbox").data("kendoTextBox");

See Also

In this article
Not finding the help you need? Improve this article