Back to Devexpress

MVCxListBoxProperties.Caption Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-mvcxlistboxproperties.md

latest1.6 KB
Original Source

MVCxListBoxProperties.Caption Property

Gets or sets the ListBox caption.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public string Caption { get; set; }
vb
Public Property Caption As String

Property Value

TypeDescription
String

A String value that specifies the text content of the ListBox caption.

|

Remarks

The code sample below demonstrates how to define a caption for the ListBox editor.

cshtml
@Html.DevExpress().ListBox(settings => {
    settings.Name = "Module";
    settings.Properties.Caption = "Select Module";
    // ...
}).BindList(ViewBag.Items).Bind(Model.Module).GetHtml()

See Also

Data Editors - CaptionOnline demo:

ListBox

MVCxListBoxProperties Class

MVCxListBoxProperties Members

DevExpress.Web.Mvc Namespace