How to set the return value of one ObjectDataSource based on another ObjectDataSource?

MethodB could read it And a ThreadLocal private DataSet m_cachedAtoB=null; public static void Reset() { m_cachedAtoB=null; } Call Reset() from the start of your page so that each thread that is recycled by ASP. NET will not leave old stale data for the next request. Did I mention that this is a hack?

Better solution: It seems like that MethodB does not take a parameter. So whatever it is that MethodB queries, let MethodA fetch it and push it into a HttpCache What I did was that my backend returend a quite big (10 tables) complete dataset to the webservers with all static data. There I had a class that had also things like your MehtodA and MehtodB.

But they always fetched the dataset. GetDataSet() queried the cahce and if it was missing queried the webservice and put it in the cahce. Every of my MethodA methods simply used LINQ to get stuff from the big dataset Of course that only works with static data.

I don't think that this is easily possible. You could drop ObjectDatasource and roll it on your own or hack around it. Maybe use a ThreadLocal static variable in that class and let MethodA put the value into that variable?

MethodB could read it. And a ThreadLocal private DataSet m_cachedAtoB=null; public static void Reset() { m_cachedAtoB=null; } Call Reset() from the start of your page so that each thread that is recycled by ASP. NET will not leave old stale data for the next request.

Did I mention that this is a hack? Better solution: It seems like that MethodB does not take a parameter. So whatever it is that MethodB queries, let MethodA fetch it and push it into a HttpCache.

What I did was that my backend returend a quite big (10 tables) complete dataset to the webservers with all static data. There I had a class that had also things like your MehtodA and MehtodB. But they always fetched the dataset.GetDataSet() queried the cahce and if it was missing queried the webservice and put it in the cahce.

Every of my MethodA methods simply used LINQ to get stuff from the big dataset. Of course that only works with static data...

The data I am using is not large just complicated to calculate, I want to avoid calculating it twice for the same input value. I was thinking about putting the data for MethodB in the Session. – TonyAbell May 14 '09 at 22:45.

You could drop ObjectDatasource and roll it on your own or hack around it. Maybe use a ThreadLocal static variable in that class and let MethodA put the value into that variable? MethodB could read it.

Call Reset() from the start of your page so that each thread that is recycled by ASP.NET will not leave old stale data for the next request. Did I mention that this is a hack? It seems like that MethodB does not take a parameter.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions