Ajax Auto Complete suggestion in asp.net using webservices (Ajax AutocompleteExtender)

AutoCompelete using Ajax in Asp.net 

Ajax a powerful script on the web, It provides you a lot more functionality to
improve your application Performance.
Here’s the article to show how to work with AutoCompleteExtender (Control in AjaxControlToolKIt).AutoComplete Description  
  • AutoComplete is an ASP.NET AJAX extender that can be attached to any TextBox control,
    and will associate that control with a popup panel to display words that
    begin with the prefix typed into the textbox.
  • The dropdown with candidate words supplied by a web service is
    positioned on the bottom left of the text box.

This means that the control will fetch the data from a Webservice(sdsd), and it can be attached to an asp.net TextBox control.
Whenever users start typing in the textbox, it automatically fetches a suggestion list from the configured Webservice.

Note: Add latest Ajax dll in your application bin folder.

Step 1: Add  Webservices (WebService.asmx)
code:  appcode/WebService.cs

Step 2: AC.aspx page:

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Ac.aspx.cs” Inherits=”Ac” %>

<%@  Register Assembly=”AjaxControlToolkit” Namespace=”AjaxControlToolkit” TagPrefix=”Ajaxtoolkit”  %>

<html xmlns=”http://www.w3.org/1999/xhtml”>
<head runat=”server”></head>

<form id=”form1″ runat=”server”>
<asp:scriptmanager id=”ScriptManager1″ runat=”server”></asp:scriptmanager>
<asp:textbox id=”TextBox1″ runat=”server”></asp:textbox>
<ajaxtoolkit:autocompleteextender enabled=”true” minimumprefixlength=”0″ runat=”server” servicemethod=”GetNames” servicepath=”WebService.asmx” targetcontrolid=”TextBox1″ usecontextkey=”true”>


  1. Hello,

    This is really interesting take on the concept. I never thought of it that way. I came across this site recently which I think it will be a great use of new ideas and informations. Thanks a lot…