?
Solved

How can I make a dropdown list with autocomplete in VB.NET and SQL?

Posted on 2010-08-18
6
Medium Priority
?
1,377 Views
Last Modified: 2012-06-21
I have a web application with 3 drop down lists that are populated from a SQL database. Each drop down displays over 5,000 results. How can I make a drop down list with autocomplete in VB.NET and SQL.  

If the person types SN then about 10 results would display like snail,snakes, snorkel. The based on the selection another textbox is populated with a numeric ID number.

So if I selected snake in one drop down field the other text field next to it would display '000450'

I have limited .NET experience and would appreciate a code sample if possible.  I was trying to use the ajax autocomplete but their website is not .NET newbie friendly.

Thanks!
<%@ Page Language="VB" AutoEventWireup="false" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Auto Complete Test</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
       
     </asp:ScriptManager>

         <div>

             <asp:DropDownList ID="DropDownList1" runat="server">
             </asp:DropDownList>
             <asp:DynamicPopulateExtender ID="DropDownList1_DynamicPopulateExtender" 
                 runat="server" Enabled="True" PopulateTriggerControlID="" 
                 TargetControlID="DropDownList1"></asp:DynamicPopulateExtender>
            <asp:TextBox ID="Name" runat="server">
            </asp:TextBox><br><br>
               <asp:DropDownList ID="DropDownList2" runat="server">
             </asp:DropDownList>
             <asp:DynamicPopulateExtender ID="DropDownList2_DynamicPopulateExtender" 
                 runat="server" Enabled="True" PopulateTriggerControlID="" 
                 TargetControlID="DropDownList2"></asp:DynamicPopulateExtender>
            <asp:TextBox ID="TextBox1" runat="server">
            </asp:TextBox><br><br>
                <asp:DropDownList ID="DropDownList3" runat="server">
             </asp:DropDownList>
             <asp:DynamicPopulateExtender ID="DropDownList3_DynamicPopulateExtender" 
                 runat="server" Enabled="True" PopulateTriggerControlID="" 
                 TargetControlID="DropDownList3"></asp:DynamicPopulateExtender>
            <asp:TextBox ID="TextBox2" runat="server">
            </asp:TextBox><br><br>
            </div>
    </form>
</body>
</html>

Open in new window

0
Comment
Question by:Rosabella
[X]
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
  • 3
  • 3
6 Comments
 
LVL 5

Expert Comment

by:muhammadyasir
ID: 33472531
0
 
LVL 5

Expert Comment

by:muhammadyasir
ID: 33472553
0
 

Author Comment

by:Rosabella
ID: 33476881
Hi Muhammadyasir,

I have seen those but they do not provide source code regarding the population of the combobox from a db. I have tried using that snippet, it also requires a webservice which I am unfamiliar with. I am a newbie to vb.net if you can provide me with source code to a working sample that would be great.

sincerely,
Rosabella
0
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
LVL 5

Expert Comment

by:muhammadyasir
ID: 33477354
just go through this page it is being used in c# and Javascript. it is great one.

http://www.codeproject.com/KB/webforms/AjaxComboBoxControl.aspx
0
 

Accepted Solution

by:
Rosabella earned 0 total points
ID: 33477498
0
 

Author Comment

by:Rosabella
ID: 33477539
The suggestions offered by the only member who answered my question I already had reviewed previously.  I was looking for more than just regurgitation from a website, as a newbie I was looking for a code sample in VB.NET not C# and found it.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

770 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