Hi All,
Am trying to use the autocomplete extender to suggest the users when they type data.Basically the data gets fetched from database through a web service.
This is my autocompleteextender properties
<
cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtasset" ServicePath="MM_AutoCompleteWebService.asmx" ServiceMethod="GetAssetData" MinimumPrefixLength="1" CompletionSetCount="10" EnableCaching="false"></cc1:AutoCompleteExtender>
and this is my web method
[
WebMethod]public string[] GetData(string prefixText, int count)
{
List<string> mylist=new List<string>();
SqlDataReader dreader = mycomm.ExecuteReader(); while (dreader.Read())
{
string strtemp = Convert.ToString(dreader["szuserfirstname"]);
mylist.Add(strtemp);
}
return mylist.ToArray();
}
Now i have specified my CompletionSetCount to be 10 but still when the results are getting displayed its very much more than 10.The number of records in my table is huge and i just want to restrict the number of entries getting displayed in the UI.Kinldy let me know how to do this.
Also can anyone tell me how to improve performance with this.Since the data is huge when i start typing it takes little time to get me the results.I basically use a stored procedure to get the results.
Thanks,
Ravi