I have installed AjaxControlToolkit v15.1, using VS 2013 Express, and am having trouble getting the AutoCompleteExtender to work.
I have created a new project, then following one of the video tutorials, deleted most of the content from the default page, added a asp:TextBox and asp:AutoCompleteExtender to the page. When I run the page, to Firefox, it comes back with a long list of singe character options, as in
```
<
D
O
C
T
Y
P
E
h
t
m
l
...etc...
```
IE and Chrome don't respond with any auto complete options at all.
Here's the default.aspx and default.aspx.cs files. Everything else is unchanged from the default project.
```
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:TextBox ID="txtBox" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ServiceMethod="AutoCompleteSymbol"
MinimumPrefixLength="2"
CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"
TargetControlID="txtBox"
ID="AutoCompleteExtender1" runat="server" FirstRowSelected = "false">
</asp:AutoCompleteExtender>
</asp:Content>
```
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication2
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod()]
public static string[] AutoCompleteSymbol(string partial, int count)
{
var retval = new List<string>();
retval.Add("Hello");
retval.Add("Hello2");
retval.Add("Hello3");
return retval.ToArray();
}
}
}
```
I've poured through thousands of online examples and tried many different variations on this code in several different projects, and it's simply not working. Is this an issue with Ajax or have I missed something somewhere?
Comments: We cannot reproduce this behavior with Firefox. Probably, you have local problems with the web server. As for the code sample you provided, it seems you did not correctly configure web service that will return an autocomplete list. Please refer to the Sample site [AutoComplete.aspx](https://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#AjaxControlToolkit.SampleSite/AutoComplete/AutoComplete.aspx) file. Note how ServicePath, ServiceMethod attributes and service itself are defined.
I have created a new project, then following one of the video tutorials, deleted most of the content from the default page, added a asp:TextBox and asp:AutoCompleteExtender to the page. When I run the page, to Firefox, it comes back with a long list of singe character options, as in
```
<
D
O
C
T
Y
P
E
h
t
m
l
...etc...
```
IE and Chrome don't respond with any auto complete options at all.
Here's the default.aspx and default.aspx.cs files. Everything else is unchanged from the default project.
```
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:TextBox ID="txtBox" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ServiceMethod="AutoCompleteSymbol"
MinimumPrefixLength="2"
CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"
TargetControlID="txtBox"
ID="AutoCompleteExtender1" runat="server" FirstRowSelected = "false">
</asp:AutoCompleteExtender>
</asp:Content>
```
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication2
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod()]
public static string[] AutoCompleteSymbol(string partial, int count)
{
var retval = new List<string>();
retval.Add("Hello");
retval.Add("Hello2");
retval.Add("Hello3");
return retval.ToArray();
}
}
}
```
I've poured through thousands of online examples and tried many different variations on this code in several different projects, and it's simply not working. Is this an issue with Ajax or have I missed something somewhere?
Comments: We cannot reproduce this behavior with Firefox. Probably, you have local problems with the web server. As for the code sample you provided, it seems you did not correctly configure web service that will return an autocomplete list. Please refer to the Sample site [AutoComplete.aspx](https://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#AjaxControlToolkit.SampleSite/AutoComplete/AutoComplete.aspx) file. Note how ServicePath, ServiceMethod attributes and service itself are defined.