Ajax List Search Extender

List Search Extender

ListSearchExtender is used with a ListBox control to Automatically select the item starting with the letters you type in the text box.

Properties

TargetControlID:

Prompt Position:

Used to specify where to display the prompt for the target control.

Prompt Text :

Used to specify the default promptText.

Prompt CSS class :

Used to specify the CSS class to use to display the prompt.

Example 

The following example demonstrates how to use the list search extender.

Add a page to the website and then place a Toolkit Script Manager and a ListBox on the page and within the Listbox Add some Items.

Within HTML source of the page with in the head section create a CSS style with the name prompt as follws.

<style type=”text/css”>

.prompt

{

font-family:Arial Black;

font-size:medium;

color : Blue;

}

                   </style>

 

Within HTML Source itself Drag & drop a ListSearchExtender and set following properties to it.

<asp: ListsearchExtender   Id=”ListSearchExtende1”  runat=”server”  TargetControlID=”L1”   Promptposition=”Top”  PromptText=”Type The text” promptcssclass=”prompt”> </asp:ListSearchExtender>

At runtime while focus is in the ListBox if you the text then the first Item in the LB starting with text you typed will automatically selected.