Enabling the ObjectDataSource_Selected event for cached data

M

msch-prv

I have an objectDataSource that populates a datalist. When fresh data
is pulled out from the db, the SelectEvent event fires and updates the
datalist custom navigation links. When data is retrieved from the
cache however, this event becomes disabled. From what I have read, it
seems that for caching the ObjectDataSource Selected event is disabled
by design.

Is there a work-around, so as to re-enable this event and update the
navigation links? Thanks for any hints.
 
M

msch-prv

To clarifiy the issue, I should perhaps mention that the cached data
is carried out via HttpContext.Current.Cache in the BLL. Caching is
disabled at the ods level. I tried also to disable the object's view
state w/o success. Do I need to raise the event?


<asp:ObjectDataSource ID="odsRecipeDet" runat="server"
SelectMethod="GetRecipePageByRecipeCatID"
TypeName="Anders.BLL.Recipes.RecipesBLL"
EnableCaching="False"
OnSelected="odsRecipeDet_Selected" EnableViewState="True">
<SelectParameters>
<asp:QueryStringParameter Name="RecipeCatID"
QueryStringField="catid" DefaultValue="0" Type="Int32" />
<asp:QueryStringParameter Name="PageIndex"
QueryStringField="page" DefaultValue="0" Type="Int32" />
<asp:parameter Name="NumRows" DefaultValue="4" Type="Int32" />
<asp:parameter Name="RecipeCount" Direction="InputOutput"
Type="Int32" DefaultValue="0" />
</SelectParameters>
</asp:ObjectDataSource>
 

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,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top