use ajax auto complete extender control
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/autocomplete.asmx" />
</Services>
</asp:ScriptManager>
<ajaxToolkit:AutoCompleteExtender BehaviorID="AutoCompleteEx" ID="atAutoComplete" runat="server" TargetControlID="txtEventLocation" CompletionInterval="100"
ServicePath="autocomplete.asmx" ServiceMethod="GetCompletionList" MinimumPrefixLength="2" CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
EnableCaching="true" DelimiterCharacters="," CompletionSetCount="200" CompletionListElementID="autocompleteDropDownPanel" UseContextKey="true"></ajaxToolkit:AutoCompleteExtender>
put the code in your page. create webservice named autocomplete.asmx
the webservice has a method named as "GetCompletionList". This method return the values and placed it in your text box like a list. then you can choose the name you want. i will attached the ajax dll and sample webservice for you.
Download source fileSagarp, if this helps please login to Mark As Answer. | Alert Moderator