Solved

DropDownList assistance

Posted on 2013-12-03
4
349 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

910 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

19 Experts available now in Live!

Get 1:1 Help Now