Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP.NET (VB) Auto Complete Combo box that populates dynamically from SQL, 2000+ entries

Posted on 2009-07-08
3
618 Views
Last Modified: 2012-05-07
Requirements:
- Autocomplete
- Populated from SQL query
- Over 2000 records, must not slow page load time
- Free (either provide code yourself or link to free component/code)
- VB
0
Comment
Question by:Cerixus
3 Comments
 
LVL 1

Expert Comment

by:SGUDAPAT
ID: 24807763
0
 
LVL 3

Expert Comment

by:Kelevra
ID: 24808303
Hi,
the best way to accomplish this, in my point of view is to use the jQuery's autocomplete:
http://www.pengoworks.com/workshop/jquery/autocomplete.htm

wich takes its data from a xml file.

so you make your Db query create your XML file upon it.

then get this autocomplete linked to this freshly made xml.

Done.
$(function() {
    $.ajax({
        type: "GET",
        url: "dbug.xml",
        dataType: "xml",
        success: function(xml) {
 
            /* Count elements */
 
            var count = jXML.getCount(xml,{"Channel":"channel","Item":"item:has(title)","GUID":"guid[isPermaLink]:lt(3)"});
            alert( count["Channel"] + ", " + count["Item"] + ", " + count["GUID"] );
 
            /* Return objects with a specific attribute */
 
            var attribute = jXML.getAttribute(xml,{"GUID":["guid","isPermaLink",null],"Channel":["channel","id",null]});
            alert( attribute["GUID"] + ", " + attribute["Channel"] );
 
            /* Return objects with a specific attribute value */
 
            var attribute = jXML.getAttribute(xml,{"GUID":["guid","isPermaLink","false"],"Channel":["channel","id","channel_1"]});
            alert( attribute["GUID"] + ", " + attribute["Channel"] );
 
            /* Return a number of objects randomized */
 
            var random = jXML.getRandomObj(xml,{"Title":["item:has(title) > title",null],"URL":["item:has(link) > link",3]});
            for (i = 0; i < random["Title"].length; i++) {
                alert( $(random["Title"][i]).text() );
            }
            for (i = 0; i < random["URL"].length; i++) {
                alert( $(random["URL"][i]).text() );
            }
 
        }
    });
});

Open in new window

0
 
LVL 1

Accepted Solution

by:
Cerixus earned 0 total points
ID: 24918767
Ended up using the Ajax autocomplete extender with a web service as seen in this video: http://www.asp.net/learn/AJAX-videos/video-122.aspx
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 38
No Data for DropDown List 2 28
C# MVC Insert Multiple Row into DB 2 30
How to use NFS (Network File System) in Asp.net mvc 5? 4 43
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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