Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Closed Unassigned: AutoCompleteExtender not working... [27834]

$
0
0
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?


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>