BuilderFactoryExtensions.BootstrapTagBox(BuilderFactory) Method

Creates a Tag Box control.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.1.dll

Syntax

public static BootstrapTagBoxBuilder BootstrapTagBox(this BuilderFactory builderFactory)

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Tag Box settings.

Returns

Type Description
BootstrapTagBoxBuilder

A builder for a Tag Box control.

The code sample below demonstrates how you can use this method to create a Tag Box control.

@(Html.DevExpress()
    .BootstrapTagBox()
    .Items(items =>
    {
        items.Add()
            .Text("Item1")
            .Value("ItemValue1");
        items.Add()
            .Text("Item2")
            .Value("ItemValue2");
        items.Add()
            .Text("Item3")
            .Value("ItemValue3");
        items.Add()
            .Text("Item4")
            .Value("ItemValue4");
        items.Add()
            .Text("Item5")
            .Value("ItemValue5");
    })
    .Value(new List<string>() { "ItemValue2", "ItemValue3" }))