sqldatasource filterexpression and paging

Discussion in 'ASP .Net' started by lewis, Jan 9, 2007.

  1. lewis

    lewis Guest

    I have a simple web site that does a search in a table.

    On the top of the screen i have several fields that allow a user to
    type in data and a search button.
    In the click of the button i set the FilterExpression of the
    datasource.
    (I am doing this manually because the where clause can be complex)

    So it may look like something as simple as
    ds.FilterExpression = "name like 'abc%'";

    When the user hits the search button the filter works correctly.
    The results are displayed and i have my paging buttons on the bottom.

    If the user then clicks any of the paging buttons. My filter expression
    is removed and a select occurs on the entire database.

    how can i get the datasource to retain my filter expression between
    posts?
    lewis, Jan 9, 2007
    #1
    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. Replies:
    1
    Views:
    7,432
    Markus
    Aug 25, 2005
  2. Henry Habermacher [MVP Access]

    GridView - Changing FilterExpression of SQLDataSource and Paging

    Henry Habermacher [MVP Access], Jan 20, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    11,001
    kmarchiony
    Jul 31, 2007
  3. Replies:
    0
    Views:
    3,074
  4. lewis
    Replies:
    0
    Views:
    483
    lewis
    Jan 10, 2007
  5. jobs
    Replies:
    1
    Views:
    1,208
    =?Utf-8?B?SmFzb24gVmVybWlsbGlvbg==?=
    Jan 29, 2007
Loading...

Share This Page