K
kurt.craver
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?
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?