Introduction
In this blog we will
be using the Web Method directly in the code behind.
Objective
- Writing the WebMethod in Code behind.
- Understanding AJAX Auto Complete Extender.
Required
- TargetControlID :- It will hold the ID of the textbox that will be used for auto-complete
- MinimumPrefixLength :- The count of characters required to enter by the user to fetch data from the database matching the Character.
- ServiceMethod :- The name of the webmethod that we have used to get data from database in the web service.(Note :- Name of the web method should be case sensitive).
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" DelimiterCharacters=""
Enabled="True" ServiceMethod="GetListofCountries" MinimumPrefixLength="1" EnableCaching="true"
ServicePath="" TargetControlID="TextBox1">
</asp:AutoCompleteExtender>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</form>
</body>

dhoni kholiPosted Dec 18, 2019, 9:25 AM
Nothing happen when i type in textbox
samuel henkPosted Jun 18, 2017, 10:16 PM
How to select from the list and get the country ID?
pictorPosted Feb 12, 2014, 12:12 AM
nothing happens when i made entry in textbox
pictorPosted Feb 12, 2014, 12:11 AM
nothin
sourav mondal 0Posted Dec 1, 2013, 1:20 PM
http://dotnetawesome.blogspot.in/2013/12/autocomplete-multi-value-textbox-without-webservice.html
Khargesh RajputPosted Oct 26, 2013, 4:28 AM
WhichType Of problem You Have?
Sachin KhamkarPosted Oct 26, 2013, 3:35 AM
I am not able to hit my service