ASP.NET AJAX Control Toolkit Demos v20.1.0.0

AutoComplete Sample
Ajax Control Toolkit
AutoComplete Demonstration
Type some characters in this textbox. The web service returns random words that start with the text you have typed.

AutoComplete Description
AutoComplete extends any ASP.NET TextBox control. It associates that control with a popup panel to display words that begin with the prefix that is entered into the text box.
AutoComplete Properties
Properties
  • CompletionInterval - Time in milliseconds when the timer will kick in to get suggestions using the web service. The default is 1000
  • CompletionListCssClass - A CSS class that will be used to style the completion list flyout.
  • CompletionListElementID - ID of an element that will serve as the completion list.
  • CompletionListHighlightedItemCssClass - A CSS class that will be used to style a highlighted item in the autocomplete list.
  • CompletionListItemCssClass - A CSS class that will be used to style an item in the autocomplete list.
  • CompletionSetCount - A number of suggestions to be provided. The default is 10
  • ContextKey - User/page specific context provided to an optional overload of the web method described by ServiceMethod/ServicePath. If the context key is used, it should have the same signature with an additional parameter named contextKey of a string type.
  • DelimiterCharacters - The character(s) used to separate words for autocomplete
  • EnableCaching - A flag to denote whether client-side caching is enabled. The default is true.
  • FirstRowSelected - Determines if the first row of the Search Results is selected by default. The default is false.
  • MinimumPrefixLength - Minimum length of text before the webservice provides suggestions. The default is 3
  • OnClientHidden - A handler attached to the client-side hidden event
  • OnClientHiding - A handler attached to the client-side hiding event
  • OnClientItemOut - A handler attached to the client-side itemOut event
  • OnClientItemOver - A handler attached to the client-side itemOver event
  • OnClientItemSelected - A handler attached to the client-side itemSelected event
  • OnClientPopulated - A handler attached to the client-side populated event
  • OnClientPopulating - A handler attached to the client-side populating event
  • OnClientShowing - A handler attached to the client-side showing event
  • OnClientShown - A handler attached to the client-side shown event
  • OnHide - OnHide animation
  • OnShow - OnShow animation
  • ServiceMethod - The web service method to be called
  • ServicePath - The path to the web service that the extender will pull the word/sentence completions from. If this is not provided, the service method should be a page method.
  • ShowOnlyCurrentWordInCompletionListItem - If delimiter characters are specified and ShowOnlyCurrentWordInCompletionListItem is set to true, then the completion list displays suggestions just for the current word, otherwise, it displays the whole string that will show up in the TextBox if that item is selected, which is the current default. The default is false.
  • UseContextKey - Whether or not the ContextKey property should be used. This will be automatically enabled if the ContextKey property is ever set (on either the client or the server). If the context key is used, it should have the same signature with an additional parameter named contextKey of a string type.

Methods
  • CreateAutoCompleteItem(text, value) - Creates a serialized JSON object representing a text/value pair that can be returned by the webservice
Copyright © 2012-2024 CodePlex Foundation. All Rights Reserved.