[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2010-08-18
6
Medium Priority
?
1,453 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

656 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