Use of AutocompleteExtender
Autocomplete extends any asp.net textbox control. It associates that control with a pop up panel to display words that begin with the prefix that is entered into the textbox. I am unable to do this. Please help me with actual code. I have cleared concept of this control, but unable to do it practically.


Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 27, 2013, 11:12 AM EDT
I modified your code check following code.
in aspx:
ServiceMethod="GetCompletionList" ContextKey="true">
in .cs method
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static List
{
string[] country = { "America", "italy", "india", "Russia", "england", "japan" };
List
foreach (string x in country)
{
if (x.StartsWith(prefixText, StringComparison.CurrentCultureIgnoreCase))
{
CountryNames.Add(x.ToString());
}
}
return CountryNames;
}
if any problem reply
if it helps you mark it as answered
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 27, 2013, 12:30 AM EDT
without using webservice
http://www.aspdotnet-suresh.com/2011/05/ajax-autocompleteextender-sample.html
with webservice
http://hightechnology.in/ajax-autocomplete-extender-example-in-asp-net/
lalit raghuvbanshi6 reputationPosted Jun 27, 2013, 2:29 AM EDT
1) using web service: Read the article: Ajax AutoCompleteExtender control example in asp.net C#,VB.Net using web service
2) without using web service i.e. creating a function in code file: Read the article: Ajax AutoCompleteExtender control example in asp.net using C#,VB.Net without using web service
Preeti AgrawallaRank #6,677 · 259 reputationPosted Jun 27, 2013, 3:06 AM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 27, 2013, 4:00 AM EDT
Means you are storing the value in database form text box or only entering data to text box
Preeti AgrawallaRank #6,677 · 259 reputationPosted Jun 27, 2013, 9:15 AM EDT
Preeti AgrawallaRank #6,677 · 259 reputationPosted Jun 27, 2013, 9:29 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jun 27, 2013, 9:48 PM EDT
if it helps you mark it as answered