troubleshooting Question

AJAX AutoCompleteExtender: webservice not called

Avatar of yellow1234
yellow1234 asked on
.NET ProgrammingAJAXWeb Services
4 Comments1 Solution1340 ViewsLast Modified:
I am using Visual Studio 2005, with the AjaxToolKit.
I have used AJAX before, cascading dropdown and all works like a breeze.
I am trying the Autocomplete  (Ajax toolkit  AutoCompleteExtender ) now but I simply cannot get the webservice called. Nothing happens.
Any idea anyone?

I kept all code as short / simple as possible so one can focus on the essential point here - to my idea why the webservice is not been called.
See below the default.aspx, default.aspx.cs (althought there is nothing happening here)  the webservice,  ( SearchAutoComlete.asmx ) and the code behind SearchAutoComlete.cs.

500 points for who can help me.

default aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajtk" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <ajtk:AutoCompleteExtender ID="AutoCompleteExtender1" TargetControlID="searchtext"
                          runat="server" ServiceMethod="GetCompletionList"
                          ServicePath="SearchAutoComplete.asmx" MinimumPrefixLength="1">
        <asp:TextBox ID="searchtext" runat="server"></asp:TextBox>

default.aspx.cs (nothing)
public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)


<%@ WebService Language="C#" CodeBehind="~/App_Code/SearchAutoComplete.cs" Class="SearchAutoComplete" %>

using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class SearchAutoComplete : System.Web.Services.WebService {

    public string[] GetCompletionList(string prefixText, int count)
        string[] mysuggestions = { "Word1", "Word2", "Word3", "Word4" };
        return mysuggestions;

      public SearchAutoComplete () {
        //Uncomment the following line if using designed components

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros