# C1.Web.Mvc.ListBox-1

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Web_Mvc_ListBox_1" data-uid="C1.Web.Mvc.ListBox`1" class="text-break">ListBox&lt;T&gt; Class
</h1>
  <div class="markdown level0 summary"><p>The ListBox control displays a list of items which may contain plain text or HTML, and allows users to select items with the mouse or the keyboard.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Web.Mvc.Component.html">Component</a></div>
    <div class="level2"><a class="xref" href="C1.Web.Mvc.Control.html">Control</a></div>
    <div class="level3"><a class="xref" href="C1.Web.Mvc.ItemsBoundControl-1.html">ItemsBoundControl</a>&lt;T&gt;</div>
    <div class="level4"><span class="xref">ListBox&lt;T&gt;</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.html.ihtmlcontent">IHtmlContent</a></div>
    <div><a class="xref" href="C1.Web.Mvc.ITemplate.html">ITemplate</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Web.Mvc.html">C1.Web.Mvc</a></h6>
  <h6><strong>Assembly</strong>: C1.AspNetCore.Mvc.dll</h6>
  <h5 id="C1_Web_Mvc_ListBox_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ListBox&lt;T&gt; : ItemsBoundControl&lt;T&gt;, IHtmlContent, ITemplate</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ListBox(Of T)
    Inherits ItemsBoundControl(Of T)
    Implements IHtmlContent, ITemplate</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1__ctor_Microsoft_AspNetCore_Mvc_Rendering_IHtmlHelper_System_String_" data-uid="C1.Web.Mvc.ListBox`1.#ctor(Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper,System.String)">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.-ctor.html#C1_Web_Mvc_ListBox_1__ctor_Microsoft_AspNetCore_Mvc_Rendering_IHtmlHelper_System_String_">ListBox(IHtmlHelper, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates one <a class="xref" href="C1.Web.Mvc.ListBox-1.html">ListBox&lt;T&gt;</a> instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_CaseSensitiveSearch" data-uid="C1.Web.Mvc.ListBox`1.CaseSensitiveSearch">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.CaseSensitiveSearch.html#C1_Web_Mvc_ListBox_1_CaseSensitiveSearch">CaseSensitiveSearch</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether searches performed while the user types should case-sensitive.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_CheckedIndexes" data-uid="C1.Web.Mvc.ListBox`1.CheckedIndexes">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.CheckedIndexes.html#C1_Web_Mvc_ListBox_1_CheckedIndexes">CheckedIndexes</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a list containing the indexes of checked items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_CheckedMemberPath" data-uid="C1.Web.Mvc.ListBox`1.CheckedMemberPath">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.CheckedMemberPath.html#C1_Web_Mvc_ListBox_1_CheckedMemberPath">CheckedMemberPath</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the name of the property used to control checkboxes placed next to each item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_CheckedValues" data-uid="C1.Web.Mvc.ListBox`1.CheckedValues">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.CheckedValues.html#C1_Web_Mvc_ListBox_1_CheckedValues">CheckedValues</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a list containing the item-values that are currently checked.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_DisplayMemberPath" data-uid="C1.Web.Mvc.ListBox`1.DisplayMemberPath">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.DisplayMemberPath.html#C1_Web_Mvc_ListBox_1_DisplayMemberPath">DisplayMemberPath</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the name of the property to use as the visual representation of the items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_IsContentHtml" data-uid="C1.Web.Mvc.ListBox`1.IsContentHtml">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.IsContentHtml.html#C1_Web_Mvc_ListBox_1_IsContentHtml">IsContentHtml</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the list displays items as plain text or as HTML.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_ItemFormatter" data-uid="C1.Web.Mvc.ListBox`1.ItemFormatter">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.ItemFormatter.html#C1_Web_Mvc_ListBox_1_ItemFormatter">ItemFormatter</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a function used to customize the values shown in the list.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_ItemRole" data-uid="C1.Web.Mvc.ListBox`1.ItemRole">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.ItemRole.html#C1_Web_Mvc_ListBox_1_ItemRole">ItemRole</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the value of the &quot;role&quot; attribute added to the list items.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_ItemTemplateContent" data-uid="C1.Web.Mvc.ListBox`1.ItemTemplateContent">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.ItemTemplateContent.html#C1_Web_Mvc_ListBox_1_ItemTemplateContent">ItemTemplateContent</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the id of the template used to generate each list item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_ItemTemplateId" data-uid="C1.Web.Mvc.ListBox`1.ItemTemplateId">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.ItemTemplateId.html#C1_Web_Mvc_ListBox_1_ItemTemplateId">ItemTemplateId</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the id of the template used to generate each list item.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_MaxHeight" data-uid="C1.Web.Mvc.ListBox`1.MaxHeight">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.MaxHeight.html#C1_Web_Mvc_ListBox_1_MaxHeight">MaxHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum height of the list.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientCheckedItemsChanged" data-uid="C1.Web.Mvc.ListBox`1.OnClientCheckedItemsChanged">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientCheckedItemsChanged.html#C1_Web_Mvc_ListBox_1_OnClientCheckedItemsChanged">OnClientCheckedItemsChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the value of the @see:checkedItems property changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientFormatItem" data-uid="C1.Web.Mvc.ListBox`1.OnClientFormatItem">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientFormatItem.html#C1_Web_Mvc_ListBox_1_OnClientFormatItem">OnClientFormatItem</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when an element representing a list item has been created.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientItemChecked" data-uid="C1.Web.Mvc.ListBox`1.OnClientItemChecked">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientItemChecked.html#C1_Web_Mvc_ListBox_1_OnClientItemChecked">OnClientItemChecked</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the current item is checked or unchecked.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientItemsChanged" data-uid="C1.Web.Mvc.ListBox`1.OnClientItemsChanged">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientItemsChanged.html#C1_Web_Mvc_ListBox_1_OnClientItemsChanged">OnClientItemsChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the list of items changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientLoadedItems" data-uid="C1.Web.Mvc.ListBox`1.OnClientLoadedItems">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientLoadedItems.html#C1_Web_Mvc_ListBox_1_OnClientLoadedItems">OnClientLoadedItems</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs after the list items are generated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientLoadingItems" data-uid="C1.Web.Mvc.ListBox`1.OnClientLoadingItems">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientLoadingItems.html#C1_Web_Mvc_ListBox_1_OnClientLoadingItems">OnClientLoadingItems</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs before the list items are generated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_OnClientSelectedIndexChanged" data-uid="C1.Web.Mvc.ListBox`1.OnClientSelectedIndexChanged">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.OnClientSelectedIndexChanged.html#C1_Web_Mvc_ListBox_1_OnClientSelectedIndexChanged">OnClientSelectedIndexChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the value of the SelectedIndex property changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_SelectedIndex" data-uid="C1.Web.Mvc.ListBox`1.SelectedIndex">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.SelectedIndex.html#C1_Web_Mvc_ListBox_1_SelectedIndex">SelectedIndex</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the index of the currently selected item in the list.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_SelectedItem" data-uid="C1.Web.Mvc.ListBox`1.SelectedItem">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.SelectedItem.html#C1_Web_Mvc_ListBox_1_SelectedItem">SelectedItem</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the item that is currently selected in the list.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_SelectedValue" data-uid="C1.Web.Mvc.ListBox`1.SelectedValue">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.SelectedValue.html#C1_Web_Mvc_ListBox_1_SelectedValue">SelectedValue</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the value of the SelectedItem, obtained using the SelectedValuePath.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_SelectedValuePath" data-uid="C1.Web.Mvc.ListBox`1.SelectedValuePath">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.SelectedValuePath.html#C1_Web_Mvc_ListBox_1_SelectedValuePath">SelectedValuePath</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the name of the property used to get the SelectedValue from the SelectedItem.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_ShowGroups" data-uid="C1.Web.Mvc.ListBox`1.ShowGroups">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.ShowGroups.html#C1_Web_Mvc_ListBox_1_ShowGroups">ShowGroups</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether the drop-down should include group header items to delimit data groups.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Web_Mvc_ListBox_1_VirtualizationThreshold" data-uid="C1.Web.Mvc.ListBox`1.VirtualizationThreshold">
          <a class="xref" href="C1.Web.Mvc.ListBox-1.VirtualizationThreshold.html#C1_Web_Mvc_ListBox_1_VirtualizationThreshold">VirtualizationThreshold</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the minimum number of rows and/or columns required to enable virtualization in the ListBox.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
