[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

session, objectdatasource and formview issue

(Andy)

1/23/2007 11:02:00 AM

I have an object.
Theres a get, update, insert (etc) method for this
The Get rturns an IList which I bind to a formview via
objectdatasource.

In the get method I store the object in session once I have it, naming
it object+id.
I first check to see if the object is in session and I return that if
it's already cached.
On insert update and delete I clear the objet out of session cache.

With formview there is a problem.
You update something in formview and the control calls the get method
afterwards as it switches to the item template.
With the object cached, the original values show.
The database is correctly updated.

Remove the code caches the object and it works correctly.

Any ideas?