www.mathertel.deThe AJAX EngineSamples 3: AJAX ControlsLookupDemo.aspx
View Source

Lookup AJAX Control sample page


This AJAX enabled control implements a Lookup Server Control that helps entering a country name. Instead of downloading the complete list of countries a WebService is used to support the autocomplete functionality.

open the LookUp list

Documentation in short:

The AJAX control is using a webservice for retrieving the list of sub-nodes (folders and files) from a given node (the user clicks):

public string GetPrefixedEntries(string prefix)

To support other datasets for the lookup you just need to implement another webservice with the same method.

On the web page a AJAX enabled web control is included:

<ajax:Lookup ID="Lookup1" lookupservice="CountryLookup" runat="server" />

LookUp.js This file implements the client side functionality by using a JavaScript behavior that is bound to the outer html element of the lookup control. The implementation handles the keyboard events and mouse clicks and is retrieving the additional for the drop down list.

You can find a more detailed documentation in the accompanying book at: http://www.mathertel.de/Ajax/AJAXeBook.aspx

This page is part of the http://www.mathertel.de/ web site.