Actually i want to make dropdown list dynamically in C# . So that in that dropdown list when i enter some value it should retrieve value from database and also when enter any alphabet, so at that time it show all the names with that alphabet in the starting . How can i do this ? Can Somebody give me example of this ? I know how to retrieve value from database but i dont't know how to do the second part . Plz help **

Recommended Answers

All 3 Replies

You may search/google for any 'autocomplete' and adapt/adjust it to whatever you want it to be. If you want really want to implement it from scratch, you will need to use Ajax (to retrieve & display selected data) + observe field (to call Ajax with the current entering data) functionalities to imitate the autocomplete.

Yes I want to start from scratch. Any Links or examples you know ?

Thank You For The Help

You may take a look at autocomplete Javascript from Matt Kruse and observer from prototype library. The version of JavaScript may not be JQuery though. I am using both of them (autocomplete for the front end and observer for calling to the backend for option list from the database. You still need to implement the part that deal with the backend in order to retrieve & build the list for select option display.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.