Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 320183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:43:48+00:00 2026-05-12T08:43:48+00:00

Hope someone can help with this. I’ve been up and down the web and

  • 0

Hope someone can help with this. I’ve been up and down the web and through this site looking for an answer, but still can’t get the Autocomplete AJAX control to work. I’ve gone from trying to include it in an existing site to stripping it right back to a very basic form and it’s still not functioning. I’m having a little more luck using Page Methods rather than a local webservice, so here is my code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="droptest.aspx.cs" Inherits="droptest" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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">    
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
        </asp:ScriptManager>
        <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" 
            MinimumPrefixLength="1" ServiceMethod="getResults" 
            TargetControlID="TextBox1">
        </cc1:AutoCompleteExtender>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Services;
using System.Web.Services;

public partial class droptest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    [WebMethod]
    public string[] getResults(string prefixText, int count)
    {
        string[] test = new string[5] { "One", "Two", "Three", "Four", "Five" };
        return test;
    }
}

Tried to keep things as simple as possible, but all I get is either the autocomplete dropdown with the source of the page (starting with the <! doctype...) letter by letter, or in IE7 it just says “UNDEFINED” all the way down the list.

I’m using Visual Web Developer 2008 at the moment, this is running on Localhost. I think I’ve exhausted all the “Try this…” options I can find, everything from adding in [ScriptMethod] to changing things in Web.Config.

Is there anything obviously wrong with this code?

Only other thing that may be having an effect is in Global.asax I do a Context.RewritePath to rewrite URLs – does this have any effect on AJAX?

Thanks for any help you can give.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:43:48+00:00Added an answer on May 12, 2026 at 8:43 am

    Right, something I’ve added in from these suggestions has worked!!! Still have a problem though, it works in a standalone project but adding it back into the existing project and it’s not working again. So thanks for the help so far, I have a working example, just have to figure out what is killing it inside the other project now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope someone can help me with this Javascript. I have an Object called
I really hope someone can help me with this. Basically i have an issue
I hope someone can help as I'm at my wits end with this. What
i hope someone can help me... my code look like this [[NSNotificationCenter defaultCenter] addObserver:self
can anyone help me with bit of refactoring advice. I have my App which
Hey guys, Need a help in Interface Builder. Usually when you insert a button,
I am not a big fan of ASPX pages, drag-and-drop and so on. I'm
When i try to create a custom InfoPath form on my Orders List I
In Sencha, I have a store with some products in. Each products has his
I want to convert Strings like 20000603163334 GST or 20000603163334 -0300 to UTC time.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.