I have an auto complete extender on my web page that when typed in gets address info from a database. I need to make two calls to the database, one to get a list of brief descriptions of addresses and another to get all the address information once an address description is selected. To make the second call I get a unique ID from the first call (If this is making sense). So far I have an auto complete extender that as I type in address information pulls back the list of descriptions, which is fine, but I have no way to pass back the unique ID (Which I don't want to show to the user). Is there anyway to pass back the unique ID in the web service without the user seeing it?
I'm not totally sure what you mean or what your level is, so this might not be what you are looking for:
When doing your (ajax?) call to the server to get the list of descriptions, you'll probably get a plain list of normal strings representing the possible descriptions. Instead of using plain strings, use something like JSON, where you put both id and name in. You can then fill your list of autocompletes using something like
foreach(var obj in suggestions)
addToList(obj.Name);
Have a collection with the original suggestions somewhere in memory (like the variable 'suggestions'); and when someone selects an autosuggested item, you can find the item back in your original array.
foreach(var obj in suggestions)
if(obj.Name == document.getElementById('suggestionTextbox').value) return obj.id;
With the id, you can do a new call to the database using PageMethods or other kinds of Ajax stuff. When using PageMethods (Google for exact def.) use something like this:
public static object GiveExtraInfo(string id)
{ //look up data in database and return the required object }
You can then do in JavaScript
var content = PageMethods.GiveExtraInfo(/*the id you selected before */);
You can now use the content whereever you like in the page.