Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"  MinimumPrefixLength="1"
        ServiceMethod="GetInfo" ServicePath="~/WebService.asmx"
        TargetControlID="Txt_searchbox"></asp:AutoCompleteExtender>


and


C#
public string[] GetInfo( string  a)
   {
       bl.id = a;
       DataTable dt = bl.Name();
        string [] user= new string [ dt.Rows .Count ];
        for (int i = 0; i < dt.Rows.Count; ++i)
        {
            user[i] = Convert.ToString(dt.Rows[i]["City_Name"]);
        }
        return user.ToArray();

   }

help me
Posted

1 solution

You don't need to use ToArray as user is already an array, but that's not the solution.
Look at http://www.c-sharpcorner.com/UploadFile/munnamax/AutocompleteExtender08062007113854AM/AutocompleteExtender.aspx[^] and do some more debugging.
 
Share this answer
 
v2

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



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