Using textbox autocomplete with an sql database

Hi, I'm having trouble trying to get my textboxs auto complete feature to read from a table from an sql database.

The table contains information like this....

          Name              Age            Job
           Joe                 45              Sales assit
           Mike                34              IT consult
            Jeff                37              manager
           John                33             None
           Jerry               23             sales

I want the autocomplete feature to read from the table (table1) and the column Name. So when 'jo' is typed the options joe and john are displayed. Could someone please explain a way to get this to work? any advice would be great, thanks.
Cannibal_JackAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
1) Set up the TextBox:

   AutoCompleteMode = Suggest
   AutoCompleteSource = CustomSource

2) Get a DataTable with unique names from the table.

3) Loop through the DataRow elements for the DataTable, and get the names, and add them to the AutoCompleteCustomSource collection.

Bob
0
 
boro_bobCommented:
Here is a link to the Scriptaculous web site which has a great auto complete feature which I have used in the past. Its pretty easy to set up.

http://wiki.script.aculo.us/scriptaculous/show/Autocompletion
0
 
Cannibal_JackAuthor Commented:
I'd really like to achieve it by just using the features built into 2005 express. Is that possible?
0
All Courses

From novice to tech pro — start learning today.