[RESOLVED]Auto Complete

Hi Friends,

I am trying to have the text (auto Complete ) displaying automatically when typing character wise. I have done to bring the Student IDs and it is working fine. In the same text box, I want to bring the name of the students.

How should I do? Pl help me on this.

Here is the detailed tutorial about how to create textbox autocomplete using Twitter typeahead in asp .net with sourcecode:

http://www.codingfusion.com/Post/Twitter-TypeAhead-Example-with-database-in-asp-ne

Hi Lathasekar,

If your datasource is json array in text file then you can use this:

JsonData:  ["Name1", "Name2", "Name3",.... ,"NameN"]

$.getJSON("Data/textFile.txt", function (data) {                
                $('#textboxId').autocomplete({
                    source: data
                });
            });

Thanks,

Avishek

Mark as Answer, if it helps you.

lathasekar

I have done to bring the Student IDs and it is working fine. In the same text box, I want to bring the name of the students

If I’ve understood you you want retrieve the id and the students name. You should return the both values since the database call. You should modify your query and return both values in the same string.

Leave a Reply