Version: 4.0.4.0
Ajax technology accesses server-side power using callbacks without reloading the browser page. Easily create Rich Internet Applications without writing JavaScript!

LiveDropDownList ASP.NET Server Control Information

LiveListBox ASP.NET Server Control Information

This page includes information about the LiveDropDownList and LiveListBox Server Controls, which are included in PowerWEB LiveControls for ASP.NET:

[View LiveControl Demo]

The LiveDropDownList and LiveListBox (both of which represent an HTML SELECT element) server controls replace the standard ASP.NET DropDownList and ListBox server controls, using remote-scripted callback technology in place of postback technology. As a result, a user is able to select an item of these lists, raising a server-event, and update client-side elements without refreshing the browser. This enables the creation of web applications which have an unprecedented level of responsiveness.

Remember! Any LiveControl which raises a callback to the server (such as LiveButton, LiveImageButton, and LiveLinkButton) raises a server event within which ANY client-side element can be visually updated without refreshing the page!

The LiveDropDownList and LiveListBox controls have the following features:

  • Cross-browser compatible, no plugins, downloads, or security warnings.
  • Uses same interface as the standard ASP.NET DropDownList and ListBox , so there is no learning curve.
  • Bind data on postback and visual update occurs client-side without a refresh.

Some example uses for LiveDropDownList and LiveListBox:

  • Create a form for a configurable product (such as Dell's "configure your computer" form) which updates the price as various options are selected/deselected.
  • Display heirachical data, displaying the items of the next node in a list as each parent node is selected.
  • Use LiveDropDownList in conjunction with LiveDataGrid to display a column which contains a dropdown in each cell.

 

Browser Compatibility

LiveControls have been tested and are fully "callback-compatible" in the following browsers:

  • Microsoft Internet Explorer 5.0+ for Windows
  • Microsoft Interner Explorer 5.0+ for Macintosh
  • Netscape 7.1+ for Windows
  • Netscape 7.1+ for Macintosh OS X
  • Mozilla 1.3+ for Windows
  • Mozilla 1.3+ for Macintosh OS X
  • Firefox for Windows
  • Firefox for Macintosh OS X
  • Camino for Macintosh OS X
  • Konqueror based engines
  • Galeon
  • Opera 5.0+

If a browser which is not compatible accesses a page containing LiveControls, the controls will fall back to the standard ASP.NET functionality. For example, a LiveButton issues a transparent callback when clicked. If on a non-compatible page, the button will still be displayed, but will cause a standard postback when clicked.

Server Tag Example

The following tags demonstrate typical settings for initializing a LiveButton, LiveLinkButton, and LiveImageButton.

<cc1:LiveDropDownList id="LiveDropDownList1" runat="server"></cc1:LiveDropDownList>
<cc1:LiveListBox id="LiveDropDownList1" runat="server"></cc1:LiveLiveBox>

Code-Behind Example

This demonstrates binding the LiveDropDownList and handling the LiveDropDownList.SelectedIndexChanged event.

// Bind some test data
ArrayList list1 = new ArrayList();
list1.Add("item 1");
list1.Add("item 2");
list1.Add("item 3");
list1.Add("item 4");
LiveDropDownList1.DataSource = list1;
LiveDropDownList1.DataBind();

// Handle SelectedIndexChanged event
private void LiveDropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
   LiveLabel1.Text = LiveDropDownList1.SelectedItem.Text;       
}