Hi,
You are using Output Cache which I think is not appropriate in your
scenario.I feel you should use Cache Object(That is data cache)
I am explaining how you can do it:
public DataTable Function funcWS()
{
if((DataTable)Cache["UniqueKey"] == null)
{
Cache.Insert("UniqueKey", myData, null, DateTime.Now.AddMinutes(10),
System.Web.Caching.Cache.NoSlidingExpiration);
}
else
{
return (DataTable)Cache["UniqueKey"] ;
}
}
Here myData is DataTable returned by your SQL Query.
I have written the code in C#.If you have doubts then feel free to ask.
Thanks and Regards,
Manish Bafna
MCP and MCTS.
> Hi,
> What needs to be done to get Webmethod caching to work in the following
[quoted text clipped - 16 lines]
> Return (dtReturn)
> End Function