i am using asp.net with c#....I am using two textbox and two Autocompleteextender control in asp.net....the first one control is used to retrieve database value from sqlserver database..the data is (example--city)..the second control is retrieve the data from the same table..the data is (example--name)..
i want to display the name only based on the city.....who one name are matching with city that names are only display in the second textbox using autocompleteextender control...
Loading

Kirtan PatelRank #292 · 8.6K reputationPosted Nov 10, 2009, 7:36 AM EST
Here is Nice Article About How to Use AutoComplte Extender Control
http://www.aspdotnetcodes.com/AutoComplete_From_Database.aspx
keshav singhRank #3,113 · 460 reputationPosted Nov 15, 2009, 7:48 PM EST
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
http://www.codeproject.com/KB/ajax/autosuggestextender.aspx
Lalit MRank #1,186 · 1.5K reputationPosted Nov 15, 2009, 8:21 PM EST
ServicePath="../AotuSuggestions.asmx"
MinimumPrefixLength="2"
CompletionInterval="100"
CompletionSetCount="20" UseContextKey="True" >
ServicePath="../AotuSuggestions.asmx"
MinimumPrefixLength="2"
CompletionInterval="100"
CompletionSetCount="20" >
you have to place the javascript after scriptmanager
your webmethod look like below
[WebMethod]
public string[] GetMainAreas(string prefixText, int count, string contextKey)
{
string CountryId = "0";
string City = "0";
if (contextKey != "" && contextKey != null)
{
City = contextKey;
}
}
keshav singhRank #3,113 · 460 reputationPosted Nov 15, 2009, 9:11 PM EST
and call this webservice into autocompleteextender control in source page
use of webservice in control you can see below links
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx