.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Autocomplete extender not firing

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net

Hello. I have a ajax autocomplete extender and when I enter something to textbox nothing happened. Why is that?

Here is my codes.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Configuration;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;

/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {

    string[] arr;

    public WebService () {

        //Uncomment the following line if using designed components 

    public string[] testing(string prefixText)
        if (prefixText.Length > 0)
            string sql = "Select * From titles Where title like @title";

            SqlDataAdapter da = new SqlDataAdapter(sql, "Data Source=****; Database=****; uid=****; pwd=****; Persist Security Info=False; Pooling=True;");

View Complete Post

More Related Resource Links

Visual Studio 2010 and Autocomplete Extender


The AutoComplete Extender control from the AJAX Control Toolkit does not work. It uses a webservice to retrieve data for the Autocomplete functionality.

The problem seems to be that the event to call the webservice does not fire

I just created a new website in VS 2010 and copied and pasted the AJAX Controltookit Example code for the Autocomplete extender. This works in VS 2008 but not VS 2010

Any ideas? suggestions? Some setting in VS 2010 that has to be tweeked.



MVC + WCF + Ajax tool kit( autocomplete extender)

I need to implement the above combination and am totally lost . Any help , pointers, useful links will be appreciated

Master Page, web service and Ajax autocomplete extender problem.

 I will appreciate very much any help about this issue.  I have been dealing with it for the last week and I couldn't detail and complete examples about this issue. The problem: I have a text box and ajax autocomplete control extender in my Master Page that it is not working at all.  When I type some characters on the text box it doesn't trigger the autocomplete. I have a web service that contains the function code. I est my code on a single Web Page (No Master Page) and it works perfectly.  Also, it works fine if I include the text box and the extender on the Content Page instead of on the Master Page.  It is important to keep the text box in the Master Page for me. I am using Visual Studio 2008 and ASP 3.5.   tHANK YOU VERY MUCH. here is my code:   MASTER PAGE. <%@ Master Language="VB" AutoEventWireup="true" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajax" %> <%@ Import Namespace = "System.Data" %> <%@ Import Namespace = "System.Data.SQLClient" %> <%@ Import Namespace = "System.Web.Script.Services" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.Services&

Autocomplete Extender ??

i would like fetch data from db and bring it on to the text box using auto complete extenderi have 2 column--- Emp_name and Emp_id in db.i want to see the name of employee when i type in the letters but when i select it from the selection of names, i would like emp_code to fill in the textboxany idea??

modal pop up extender button click is not firing


Hi All,


I have a modal pop up extender that is working fine. Inside the modal pop up window I have 2 buttons yes No

If I click on yes I am redirecting it to a diff page. No is simply closing the pop up.

In my .cs file buttonclick I added the response.redirect();

But my OnClick="BtnYes_Click" is never getting fired although I click on the yes button. What is wrong?



<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" >
                   <asp:Button ID="btnTarget" runat ="server" style="display:none" />

AutoComplete extender result display location



I don't see a property that would help define the location where matched items should be displayed. I have a strange behavior where if there are multiple matches, AutoComplete extender displays the list of matches nice right below my TextBox. However, if there's only one match, it's displayed some 30 or so pixels above the TextBox. Strangely, I find myself hitting the up arrow key because the suggestion is displayed above but looks like the expected behavior is down arrow.

Is there a way to specify where the suggestions list should be displayed?

Textbox and AutoComplete Extender problem


I have a textbox which takes data from autocomplete.

I want to check the textbox text and if the text wasn't taken from autocomplete extender, I want to clear the text.

How can I do this ?


autocomplete extender not working


dear all

i'm trying to make this work for several days but it just doesn't work.

this is my code:

aspx page:

<%@ Page Language="C#" AutoEventWireup="true" Trace="false" ValidateRequest="false" CodeBehind="ajaxform1.aspx.cs" Inherits="ajaxtest1.ajaxform1" %>

<%@ 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">
<body style="text-align: center">
    <form id="form1" runat="server">
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false">
    <asp:ServiceReference Path="~/autocomplete.asmx" />
    <asp:TextBox ID="TextBox1" runat="server" Height="21px" Width="350px">

Browser compatibility Issue while using autocomplete extender in asp


how to set the comaptibility for browsers in an asp.net page

i have used the following code in my master page but its only working for IE not for FF or other browsers.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Can any one help please

AutoComplete no firing...



I'm trying to get AutoComplete working in a projecto of mine but i can't get it to work :(

Here's my .aspx:

<label>Nome:</label><asp:TextBox ID="nomeTextBox" Width="325px" MaxLength="30" runat="server"></asp:TextBox>
 <asp:AutoCompleteExtender ID="nomeAutoComplete" TargetControlID="nomeTextBox"

And here's my service method:

    public string[] GetNomes(string prefixText, int count)
        count =

autocomplete extender CSS problem in IE8


I have applied the default CSS in Autocomplete extender but it CSS is broken in IE8.


Can anyone provide me the CSS classes for autocomplete extender that work in all the browsers? 

autocomplete extender with wild cards


hey all

I just started using the ajax control toolkit and i'm trying to use the autocomplete extender with wild cards.

i tried several things but with no luck.

any ideas? 

Ajax autocomplete extender



I want to create a email application in which i want to select multiple email id's in the To textarea.

I an using ajax auto complete extender to fetch the email id's from the database. I am able to display the email id's, but my problem is that i want to select multiple emailid's in one time(Like in real application) How can i achieve that?

Using ajax auto complete extender i am able to  select only one email id. Plz help me with this as soon as possible.....

How to pass 2 parameters to the autoComplete Extender



help please, I'm really stuck!!


I'm trying to pass a static value (from a list box) into an Autocomplete Extender.   I've had Autocomplete working with just the prefixText but can not get it to work when passing an extra parameter through the contextKey.


Please see below:


On Page Load:

 AutoCompleteExtender1.ContextKey = lstUserID.SelectedValue


(the 'lstUserID' holds the ID of the group logged in)


the autoComplete Extender:



jquery autocomplete not firing




iam using jquery auto complete for ,but its not firing handlerold.ashx file,

pls give valuable suggestions

script type="text/javascript">
//      $(document).ready(function()
//      {
        $("#<%=txtguages.ClientID%>").autocomplete('Handlerold.ashx',{minChars:1,extraParams:{"param1":"1"}}).result(function (event, data, formatted) {
        if (data) {
            alert('Value: '+ data[1]);
            $("#<%= Hdnguages.ClientID %>").val(data[1]);
        else {
            $("#<%= Hdnguages.ClientID %>").val('-1');

handlerold.ashx code below

<%@ WebHandler Language="C#" %>

using System;
using System.Web;
using vdatalayer;
using System.Data.SqlClient;
using S

jquery autocomplete multiple values


i got some samples and i did autocomplete using jquery , its working well for single input values

but i need to pass multiples values after one by one in the textbox. Is it possible to pass multiple

values in the textbox for autocomplete in jquery in asp.net?


no intellisense, smart tag, extender wizard etc


Development Environment:  VS 2008 Pro, IIS 6, asp.net 2.x, sql 2005 server

Installed the version of AJAX Toolkit and Library for the .net 2.0 compatibility (as IIS is still using 2.x)

The problem is as that within the vs 2008 pro, when I select for example a button control...there should be an additional pop-up intellisense indicating...add extender.

to compound this, within the extender control ... the TargetControlID -- should be a drop-down list, indicating which controls are compatible with the extender ... there is no drop-down list.

even if I manually type the control to associate the extender with, this has no effect on the control (such as textbox control) -- as there should be another option appear indicating the association has taken place).

 below is the steps to take (as written by MS) -- but this is what I am not getting:

"If the Button Tasks shortcut menu does not appear, right-click the Button control and then click Show Smart Tag."  -- the smart tag is not appearing

To add an AJAX extender control
Switch to Design view.

If the page does not already contain a ScriptManager control, from the AJAX Extensions tab of the Toolbox, drag one onto the page.

A ScriptManager c

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend