BuilderFactoryExtensions.BootstrapTagBox(BuilderFactory, String) Method
Creates a Tag Box control with a specified name.
Namespace: DevExpress.AspNetCore
Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll
Declaration
public static BootstrapTagBoxBuilder BootstrapTagBox(
this BuilderFactory builderFactory,
string name
)
Parameters
Name | Type | Description |
---|---|---|
builderFactory | BuilderFactory | A BuilderFactory object providing access to Tag Box settings. |
name | String | A control name. |
Returns
Type | Description |
---|---|
BootstrapTagBoxBuilder | A builder for a Tag 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 Tag Box control.
@(Html.DevExpress()
.BootstrapTagBox("tagBoxDefault")
.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" }))
See Also