Making AutoCompleteExtender more usable

Last post 04-30-2008 11:18 AM by sferson. 1 replies.

Sort Posts:

  • Making AutoCompleteExtender more usable

    02-02-2007, 2:40 PM

    I've finally figured out how to use AutoCompleteExtender and i am not overly happy with it's current functionality.

    First, i would like to be able to style the suggestions. When i try to add HTML to the string array getting returned by the web service, it just escapes all the HTML charachters. I would like to be able to show the item, and the description for that item, in a different font.

    Also, when the item is selected, i would like it's ID stored somewhere. I've seen a workaround for this with an invisible button, so i am OK with using that approach, but i was wondering if there's a more graceful solution.  

     Thanks in advance!
     

  • Re: Making AutoCompleteExtender more usable

    04-30-2008, 11:18 AM
    • Loading...
    • sferson
    • Joined on 10-23-2007, 12:03 PM
    • Belfast, UK
    • Posts 9

    You can use the OnClientItemSelected attribute to call a javascript function (which can store the ID somewhere, like a hidden field for example).

    I haven't managed to solve the HTML styling either though. We're trying to highlight the search terms in bold using span or strong tags, but have found that the AutoCompleteExtender control is escaping any HTML we send back.

    Anyone figured this out?

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter