Download Now Code Base AsyncDocs Contact Us
asyncListBox
liveDemo
  • Click "Add Item" to add a new list item to the list box.
  • Click "Remove Selected Item" to remove the selected item from the list box.
  • You can also select a list item or multiple list items to have their value(s) appear below the list box.
Change the selected item.
Description

The AsyncListBox is an AsyncWebControl that allows dynamic and static list items to be displayed to the user.



Features
  • List items can be added, modified, and removed during an AsyncCallback.
  • Can be focued during an AsyncCallback.
  • Its an AsyncWebControl, which means that you can change it's visibility, CSS class, Left/Top coordinate, Width/Height, and ForeColor/BackColor, during an AsyncCallback.
  • Provides internal validation, giving you the ability to validate the control without creating another control.
  • Allows you to easily receive OnSelectedIndexChanged events.
  • Change the SelectedIndex and SelectedValue during an AsyncCallback.
  • Supports many of the other properties provided by asp:ListBox.
  • Functions as a regular server control if the browser does not support asynchronus operations, allowing you to support legacy browsers.
   
<%@ Register Assembly="AsyncControls" Namespace="DelvingWare.AsyncControls" TagPrefix="dw" %>

<dw:AsyncListBox runat="server" ID="drpMain" 
Rows="10" 
OnSelectedIndexChanged="drpMain_IndexChanged">
    <AsyncListItem Value="one" Text="List Item One" />
    <AsyncListItem Value="two" Selected="true" Text="List Item Two" />
    <AsyncListItem Value="three" Text="List Item Three" />
</dw:AsyncListBox>

<dw:AsyncLabel runat="server" ID="lblMain">Change the selected item.</dw:AsyncLabel>

<dw:AsyncButton runat="server" ID="btAdd" 
OnClick="btAdd_Click"
CssClass="greyButton">Add Item</dw:AsyncButton>

<dw:AsyncButton runat="server" ID="btRemove" 
OnClick="btRemove_Click"
CssClass="greyButton">Remove Selected Item</dw:AsyncButton>