How create Advanced Search?

Discussion in 'ASP .Net' started by Bobby Edward, Oct 13, 2008.

  1. Bobby Edward

    Bobby Edward Guest

    I am creating an Advanced Search form. The user can select whether their
    phrase will search the "Title", "Description" or "All" fields.

    Obviously the WHERE clause will change, depending on the options they
    select.

    Any suggestions on how to implement this? Is the FilterExpression on the
    DataSource powerful enough to do this? How have you done similar things?

    I am using a 3 tiered architecture.

    Thanks!
     
    Bobby Edward, Oct 13, 2008
    #1
    1. Advertising

  2. First of all, are you using stored procedures or not? One good way to do
    this is to use the SQL keyword LIKE. If you do not want to search the field,
    use the value '%' as in the following:

    WHERE Title LIKE '%' AND Description LIKE '%' AND All LIKE 'my search
    phrase'

    If you are using stored procedures, you can use the SQL IF. We may be able
    to help you better if we could see your code, including the *.aspx file so
    we know how the user will be searching. Good Luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Bobby Edward" <> wrote in message
    news:...
    >I am creating an Advanced Search form. The user can select whether their
    >phrase will search the "Title", "Description" or "All" fields.
    >
    > Obviously the WHERE clause will change, depending on the options they
    > select.
    >
    > Any suggestions on how to implement this? Is the FilterExpression on the
    > DataSource powerful enough to do this? How have you done similar things?
    >
    > I am using a 3 tiered architecture.
    >
    > Thanks!
    >
     
    Nathan Sokalski, Oct 14, 2008
    #2
    1. Advertising

  3. Bobby Edward

    Bobby Edward Guest

    "Nathan Sokalski" <> wrote in message
    news:%...
    > First of all, are you using stored procedures or not? One good way to do
    > this is to use the SQL keyword LIKE. If you do not want to search the
    > field, use the value '%' as in the following:


    No. I'm using a BLL class which calls methods in the XSD dataset.

    >
    > WHERE Title LIKE '%' AND Description LIKE '%' AND All LIKE 'my search
    > phrase'
    >


    Would you use the FilterExpression for this?

    Thanks!
     
    Bobby Edward, Oct 15, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?amF2YXd6bA==?=

    Advanced Search Control

    =?Utf-8?B?amF2YXd6bA==?=, Jun 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    492
  2. Jan Faerber

    advanced google groups search

    Jan Faerber, Feb 1, 2005, in forum: HTML
    Replies:
    4
    Views:
    684
    Jan Faerber
    Feb 2, 2005
  3. =?Utf-8?B?SklNLkgu?=

    Advanced search function

    =?Utf-8?B?SklNLkgu?=, Sep 21, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    526
    =?Utf-8?B?SklNLkgu?=
    Sep 21, 2007
  4. Michele Simionato
    Replies:
    1
    Views:
    605
    Lacrima
    Mar 27, 2010
  5. Abby Lee
    Replies:
    5
    Views:
    421
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page