Field for searching for database record

Last post 05-15-2009 10:25 AM by p.a. 5 replies.

Sort Posts:

  • Field for searching for database record

    05-14-2009, 1:58 AM
    • Member
      19 point Member
    • davsha77
    • Member since 03-26-2009, 4:04 AM
    • Posts 89

    I have a field visitors can use to find records in teh database.  However, the data must be validated to make teh search as fast as possible.

     I have seen search fields in iTunes and on eBay.  As the user starts typing a pop-up shows the possible matches.  As the user types teh list gets smaller and smaller until the best possible match is displayed.

    Does anyone know how this is done?

    To make it a little more complicated, the search must look in two tables.  The main table contains standard items and the second table contains the aliases (or common mispellings, or abbreviations) so that it will find the appropriate record either way.

    Thanks in advance for your ideas and suggestions.

  • Re: Field for searching for database record

    05-14-2009, 6:02 AM
    • Member
      30 point Member
    • p.a
    • Member since 09-10-2008, 5:58 AM
    • Posts 10

    I think you are talking about Ajax controls.

    You can add an Ajax extender to a TextBox control to achieve what you want.

    See here : http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx

    I remember having using this once. At first it seems complicated but in fact you can add the extender and try and you will see that's not so complicated.

    p.a

  • Re: Field for searching for database record

    05-14-2009, 6:19 AM
    • All-Star
      28,480 point All-Star
    • venkatu2005
    • Member since 07-01-2008, 6:48 AM
    • Posts 5,897

    davsha77:
     I have seen search fields in iTunes and on eBay.  As the user starts typing a pop-up shows the possible matches.
     

    You have look AutoCompleteExtender in AJAX

    http://www.developerbarn.com/net-code-samples/75-using-ajax-auto-complete-extender-database.html

    MY Blog :

    http://venkat-dotnetsnippets.blogspot.com
    http://venkatdotnetexperiments.wordpress.com

    Regards,
    Venkatesan.M

    Please Mark as Answered If this is helpful Or Un-Mark as Answered if it is not helpful.
  • Re: Field for searching for database record

    05-14-2009, 6:19 AM
    Thank u

    Baba

    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: Field for searching for database record

    05-14-2009, 9:42 AM
    • Member
      19 point Member
    • davsha77
    • Member since 03-26-2009, 4:04 AM
    • Posts 89

     I saw autocomplete in the tool box, and it is the concept of what I want.  However, even with the static data and a small list, it is still not instantaneous. 

    If you go to http://www.ebay.com/ and start searching for something you will see how fast it is, same with iTunes.  I am not sure what they are doing to make it so fast, but I want to do that too.

  • Re: Field for searching for database record

    05-15-2009, 10:25 AM
    Answer
    • Member
      30 point Member
    • p.a
    • Member since 09-10-2008, 5:58 AM
    • Posts 10

    You can enable caching and do some improvements (you can reduce the number of occurrences displayed, ...) but I believe you won't be able to compete with Ebay or Apple.

    They certainly have fine tuned the system for their use and don't forget that Ebay or Apple servers are certainly a bit more powerful than most of what we are used to see.

    p.a

    P.S. : If you want to be sure that your app is really slow, go to Google and perform a search. They also use Ajax and achieve really low delays. There is also live.com that uses ASP.NET and is not bad either.

Page 1 of 1 (6 items)