Skip to main content

BuilderFactoryExtensions.BootstrapListBox(BuilderFactory) Method

Creates a List Box control.

Namespace: DevExpress.AspNetCore

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

Declaration

public static BootstrapListBoxBuilder BootstrapListBox(
    this BuilderFactory builderFactory
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to List Box settings.

Returns

Type Description
BootstrapListBoxBuilder

A builder for a List Box control.

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

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

@(Html.DevExpress()
    .BootstrapListBox()
    .Value("Item1")
    .Items(items => {
        items.Add()
            .Text("Item1")
            .Value("Item1");
        items.Add()
            .Text("Item2")
            .Value("Item2");
        items.Add()
            .Text("Item3")
            .Value("Item3");
        items.Add()
            .Text("Item4")
            .Value("Item4");
        items.Add()
            .Text("Item5")
            .Value("Item5");
    })
)
See Also