Download Now Code Base AsyncDocs Contact Us
asyncDropDownList
liveDemo
  • Click "Add Item" to add a new list item to the dropdown.
  • Click "Remove Item" to remove the selected item from the dropdown.
Change the selected item.

Description

The AsyncDropDownList 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:DropDownList.
  • 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:AsyncDropDownList runat="server" ID="drpMain" 
OnSelectedIndexChanged="drpMain_IndexChanged">
    <AsyncListItem Value="one">A List Item</AsyncListItem>
    <AsyncListItem Value="two">Another ListItem</AsyncListItem>
    <AsyncListItem Value="three" Selected="true">One More List Item</AsyncListItem>
</dw:AsyncDropDownList>

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

<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>