sqldatasource filterexpression and paging

L

lewis

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top