Ajax.NET and System.Web.Caching.Cache

Michael Schwarz on Thursday, October 6, 2005

[1]Today I found an article about caching using Ajax.NET. In the article the author said that the Cache object is not working with Ajax.NET. I have done a small example to show how to use the Cache object in AJAX methods.

The ZIP [2] file is a ASP.NET 2.0 project, but the default.aspx (inline code) will work with .NET 1.x, too.

Update: Instead of System.Web.HttpContext.Current.Cache/Session/Application you can also use Context.Cache/Session/Application if you are using System.Web.UI.Page as you Ajax.NET method class.