AutoSuggestMenu Demo 3

Using Web Service as DataSource

In Demo 1 and Demo 2 suggestions are loaded from code-behind of appropriate pages using PageMethods.< Name of a function >. If you would like to keep all your suggestion loader functions in one place - you can do it two ways:
  1. Create a class with static methods (for ex. SuggestionsDataSource) and call SuggestionsDataSource.GetCitySuggestions, SuggestionsDataSource.GetCountrySuggestions functions from the code-behind of ASPX pages.
  2. Create a webservice with GetSuggestion... methods and specify appropriate method name in AutoSuggestMenu declaration.
This example implements a second approach.

Select Country: