Multi column or ItemData in AJAX AutoCompleteExtender?
Posted on 2009-03-31
I've got the AJAX AutoCompleteExtender working in my project. For example, one of them a list of suburbs - if you type in "BUR" it will start listing "BURWOOD" "BURWOOD EAST" etc.
That's great, except that to really use the response, I need to access an ID number, not the string itself. For example, the submitted page needs to use Suburb_ID 1500 rather than the string "BURWOOD".
The lazy approach would be to run SQL queries to translate the string back into the ID ("SELECT ID FROM Suburbs WHERE Name = 'BURWOOD'; ") but architecturally and performance wise this is dreadful.
So my question: Is there a way to for AJAX AutoCompleteExtender to store multiple columns, or, associated item data with each item it lists?