You should be familiar with facebook by now On a profile, you can type your friend name but short letters, textbox will suggest the following match like this below: Can you tell me how does this work? does it connect to the database as you type in the textbox? that is very sensitive to the database server. Imagine thousands of users typing friend name or even trying to abuse on the textbox. I am guessing each profile has an xml file with list of friends?