Help with ASP.NET AJAX Toolkit - Combobox

I'm trying to implement the AJAX Combobox found in the AJAX Toolkit and I'm having a strange problem.  My page loads and the values load into the ComboBox dropdown however, if you type something into the box nothing happens.  No error, no suggestions... nothing.  If you click the dropdown you can see all the values but typing in the ComboBox does nothing.

I was following the instructions here:

https://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ComboBox/ComboBox.aspx

I've attached my code.  Am I doing something wrong?  Am I missing something?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AJAX_ComboBox.aspx.vb" Inherits="sysex_AJAX_ComboBox" %>

<%@ 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 runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p><b>AJAX Combox Box - Loading Customer IDs from CUSTOMERS Table</b></p>
        
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        
        <asp:ComboBox             
            ID="ComboBox1" 
            DataSourceID="SqlDataSource1"
            DataTextField="CUSTOMID" 
            DataValueField="CUSTOMID" 
            MaxLength="0" 
            runat="server" 
            AutoCompleteMode="Suggest" 
            RenderMode="Inline">
        </asp:ComboBox>
        
        <asp:SqlDataSource 
            ID="SqlDataSource1" 
            runat="server"     
            ConnectionString="<%$ ConnectionStrings:My_ConnectionString %>" 
            SelectCommand="SELECT [CUSTOMID] FROM [CUSTOMERS] ORDER BY [CUSTOMID]">
        </asp:SqlDataSource>       
           
    </div>
    </form>
</body>
</html>

Open in new window

cdemott33Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

meetingexpectationsCommented:
If you run in IE, do you see any javascript errors in the bottom left of the browser window?
0
cdemott33Author Commented:
This first time I ran it.. yes.  The error informed me that I needed to use ToolkitScriptManager versus ScriptManager.  So I removed the ScriptManager and added the ToolkitScriptManager.

After I did that the page loaded with no issues.  No javascript errors.  The combobox appear.   However, it didn't work.  I'd type something into the combobox and nothing would happen.
0
cdemott33Author Commented:
I just tried this...

        <asp:ComboBox            
            ID="ComboBox1"
            MaxLength="0"
            runat="server"
            AutoCompleteMode="Suggest"
            RenderMode="Inline">
            <asp:ListItem Text="Adam" Value="0" />
            <asp:ListItem Text="Alycia" Value="1" />
            <asp:ListItem Text="Alex" Value="2" />
            <asp:ListItem Text="Babby" Value="3" />
            <asp:ListItem Text="Bob" Value="4" />
            <asp:ListItem Text="Chris" Value="5" />
            <asp:ListItem Text="Christine" Value="6" />
            <asp:ListItem Text="Craig" Value="7" />
            <asp:ListItem Text="Doug" Value="8" />
        </asp:ComboBox>

and it works perfectly?  So perhaps it has something to do with the DB Binding???
0
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

meetingexpectationsCommented:
try changing the tagprefix for this to not use the standard asp, rename it to say cc1..
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
0
meetingexpectationsCommented:
I tried with databinding and do not see any issue. Is your customid same as your values shown above?
0
cdemott33Author Commented:
I'll give that a shot and let you know the result.  Thanks for your help, it's true appreciated.
0
AsishRajCommented:
this is how i did it. Works fine

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>

<%@ 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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
        <asp:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="Suggest" 
            DataSourceID="SqlDataSource1" DataTextField="NewsTitle" 
            DataValueField="NewsTitle" MaxLength="0" style="display: inline;">
        </asp:ComboBox>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:News %>" 
            SelectCommand="SELECT [NewsTitle] FROM [News]"></asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

Open in new window

0
AsishRajCommented:
Ok i have gone through your code one by one and i didnt find any errors.

can you check you SQL if its returning the right thing. something to do with your db
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cdemott33Author Commented:
You were right.  My code was fine.  It was just a blip on my server.  Thanks for your help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AJAX

From novice to tech pro — start learning today.