A text box will get Autocomplete values from a webmethod.Follow the example.
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" UseContextKey="True"
ServiceMethod="GetCompletionList" TargetControlID="TextBox1" MinimumPrefixLength="3"
CompletionSetCount="3" EnableCaching="true">
</cc1:AutoCompleteExtender>
[System.Web.Services.WebMethodAttribute(), System.Web.Script.Services.ScriptMethodAttribute()]
public static string[] GetCompletionList(string prefixText, int count, string contextKey)
{
string[] st = new string[4];
st[0] = prefixText + "hai";
st[1] = prefixText + "hai";
st[2] = prefixText + "hai";
st[3] = prefixText + "hai";
return st;
}
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.