Solved

DropDownList assistance

Posted on 2013-12-03
4
347 Views
Last Modified: 2013-12-05
I'm developing a utility for my company in ASP.Net/VB.Net and I need the page to have auto-complete style DropDownList...  Unfortunately when you click on the DropDownList I've added on the webpage it doesn't allow typing entry to simplify search.  I'm loading the DD via a code based ADO-Teradata query into the DropDownList.  I've searched and found a few C# options and Jquery but they seem very involved for something I think should be simple.  Isn't there a control or something that should allow for ease of item location?  Thanks for any assistance!
0
Comment
Question by:EDW_Gideon
4 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 250 total points
ID: 39695089
There are two answers, if you are comfortable with ASP.net AJAX toolkit, you can check out this link:
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/autocomplete/autocomplete.aspx

if you want to build it from scratch(that's not tough either) you can follow this article and replace

    public string[] FindName(string prefixText, int count) 
    {        
        //return all records whose Title starts with the prefix input string         
        List<string> titleArList = new List<string>();         
        SqlDataReader drProducts = sqlProductProvider.GetNameList(prefixText);         
        while (drProducts.Read()) {            
            string strTemp = Convert.ToString(drProducts("Name")); 
            titleArList.Add(strTemp); 
        }   
        return titleArList.ToArray(); 
    } 

Open in new window


with appropriate code.

http://www.c-sharpcorner.com/uploadfile/raj1979/auto-complete-in-Asp-Net-using-ajax/
0
 
LVL 28

Assisted Solution

by:sybe
sybe earned 250 total points
ID: 39695153
Actually a regular dropdown will respond to letters entered and as such have a form of autocomplete.

Just try in out, focus on a large dropdown in your browser (sopmething like a country list) and start typing some letters....
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now