I am modifying an existing application developed by another programmer using ASP.NET Web Forms and C#.
I have to add to a simple TextBox the autocomplete functionality. When the user starts to input something into the TextBox, the TextBox should show suggestions based on the data stored in a database. The suggestions have to be based just on the prefix (the initial part of the words already inputed).
I found many examples based on the autocomplete AJAX extender but it is based on fetching data froma Web Service. What are the steps and required methods and operations in order to fulfill this task?
Link you posted is pretty much explains everything that needs to be done . Follow this video.
If you need to pass some additional parametes check this example.
Steps.
1.Add Textbox and Ajax Extender to page and specify target id as textboxid .Specify web service name to extender
2.Implement webservice as in link above and test it in browser .
3.In webservice write the way you want to retrieve data . You will be returning a string[] .
Instead of creating webservice you can even use webmethod attribute to a regular method check following
http://www.ajaxtutorials.com/ajax-tutorials/using-autocomplete-in-the-ajax-toolkit/
http://allwrong.wordpress.com/2007/03/13/ms-ajax-autocomplete-extender-using-a-page-method/