DropDownList TagHelper Overview

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

The DropDownList displays a list of values and allows for a single selection from the list. The user input is restricted within the predefined options.

Telerik UI for ASP.NET Core Ninja image

The DropDownList 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.

Initializing the DropDownList

The following example demonstrates how to define the DropDownList by using the DropDownList TagHelper.

    <kendo-dropdownlist name="products" filter="FilterType.StartsWith"></kendo-dropdownlist>

Basic Configuration

The DropDownList TagHelper configuration options are passed as attributes of the tag.

          .HtmlAttributes(new { style = "width:100%;" })
          .DataSource(source => source
              .Read(read => read.Action("GetProducts", "Home"))

    <kendo-dropdownlist name="products" filter="FilterType.Contains"
                        placeholder="Select product"
                        style="width: 100%;">
        <datasource type="DataSourceTagHelperType.Custom">
                <read url="@Url.Action("GetProducts", "Home")" />
    public JsonResult GetProducts(string text)
        using (var northwind = GetContext())
            var products = northwind.Products.Select(product => new ProductViewModel
                ProductID = product.ProductID,
                ProductName = product.ProductName,
                UnitPrice = product.UnitPrice.Value,
                UnitsInStock = product.UnitsInStock.Value,
                UnitsOnOrder = product.UnitsOnOrder.Value,
                Discontinued = product.Discontinued

            if (!string.IsNullOrEmpty(text))
                products = products.Where(p => p.ProductName.Contains(text));

            return Json(products.ToList());

See Also

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