Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to display country in Autocomplete extender by using Usercontrol(.ascx page)
But its not working. Already Tried code in web service file and ascx.cs file
but method is not firing.

I need solution.
Posted

1 solution

ASCX CODE:
XML
<asp:TextBox ID="TextBox1" runat="server" CssClass="control"></asp:TextBox>
<asp:AutoCompleteExtender ID="TextBox1_AutoCompleteExtender" runat="server" DelimiterCharacters=""
    Enabled="True" ServicePath="~/Search.aspx" ServiceMethod="GetCompletionList" TargetControlID="TextBox1" MinimumPrefixLength="2"
    UseContextKey="True">


aspx code:
C#
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string[] GetCompletionList(string prefixText, int count)
{
    VisualArchiveServiceClient client = new VisualArchiveServiceClient();
    string environment = ConfigurationManager.AppSettings["Environment"];
    return client.GetWildcardAutoComplete(environment, prefixText).ToArray();
}



its working fine...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900