NET page in which the AutoCompleteExtender will reside. But first, let??™s start
with the page itself. Create an ASP.NET TextBox control on the page, followed by the
ScriptManager and the AutoCompleteExtender control. After that, specify the parameters
as shown here:
ServicePath="AutoComplete.asmx" MinimumPrefixLength="3"
ServiceMethod="GetSuggestedStrings" TargetControlID="TextBox1"
CompletionInterval="10" CompletionSetCount="3"
EnableCaching="true" runat="server">
The code basically set the AutoCompleteExtender control up to suggest three pieces of
text as long as at least three characters have been entered into the text box. The code also
specified the ServicePath and set the ServiceMethod property to GetSuggestedStrings, so
the control now expects this web method as its data source for the suggestions. The
expected web service method must match the following signature:
public string[] GetSuggestedStrings(string prefixText, int count)
CHAPTER 7 ?– USING THE ASP.
Pages:
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222