By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

SQLDataSource Caching and Filtering

P: n/a
I have a component control that I created as a UserControl which
contains a SqlDataSource control, a GridView control, a DropDownList
control, a TextBox control, and a Button control. The idea is that the
user can select a column from the DropDownList, enter some text to
search on in that column, and click the Button to perform the search.
Then only the records matching the search criteria for that column will
be displayed.

The search capability is working, but the SqlDataSource is firing the
Selected event every time my UserControl updates the FilterExpression
of the SqlDataSource. The same thing happens every time the page of
the GridView is changed.

The SqlDataSource has EnableChacing set to true, DataSourceMode set to
DataSet, and the CacheDuration is set to Infinite. Isn't the purpose
of caching the SQLDataSource so that you can page through and filter
the result set without having to hit the database each time?

Jun 12 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.