Take the 2-minute tour ×

I have a website that uses the AjaxControlToolkit. I'm making some parallel iPhone-friendly pages for the site, and since Ajax isn't very good-looking in a mobile browser, I'm trying to phase it out. One such Ajax tool is the CalendarExtender, which I replaced with the iPhone's Date Picker using this method.

The second tool I need to replace is the AutoCompleteExtender. It functions as a simple dropdown menu when the user types text into a text box. The purpose is for searching functionality; I have a large list of contacts, and when the user starts to type in a name or company name the extender appears with a list of suggestions based on what the user typed in so far.

Here's what it looks like in Ajax:

<asp:TextBox ID="NameTextBox" runat="server" AutoComplete="off" AutoPostBack="True"
                                        OnTextChanged="NameTextBox_TextChanged" Width="95%" Font-Size="Medium"></asp:TextBox>
                                    <cc1:AutoCompleteExtender ID="NameTextBox_AutoCompleteExtender" runat="server" CompletionInterval="250"
                                        CompletionListCssClass="autocomplete_completionListElement" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                                        CompletionListItemCssClass="autocomplete_listItem" DelimiterCharacters="" Enabled="True"
                                        MinimumPrefixLength="2" ServiceMethod="GetCompletionList" ServicePath="" TargetControlID="NameTextBox"

What is a good way to replace this with either a common piece of iPhone UI (such as the UIPickerView), or a more general mobile-friendly piece of HTML?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I would use a standard HTML element to maintain user experience. For the autocomplete part I would use some javascript or an jQuery plugin. You could also choose to use Autocomplete from jQuery UI: http://jqueryui.com/demos/autocomplete/.

share|improve this answer
This looks like it should work quite nicely. I'll need to see how well it handles larger elements in the autocomplete list (each element in my list is the full name and company name of a contact). But viewing that demo from my app looked smooth and clear, unlike the Ajax tool which broke rather severely in this mobile environment. –  Andrew Mar 26 '12 at 17:56
add comment

Your Answer


