Cache.Get Method

Retrieves the specified item from the Cache object.

Namespace: System.Web.Caching
Assembly: System.Web (in system.web.dll)

public Object Get (
	string key
public Object Get (
	String key
public function Get (
	key : String
) : Object
Not applicable.



The identifier for the cache item to retrieve.

Return Value

The retrieved cache item, or a null reference (Nothing in Visual Basic) if the key is not found.

The following example demonstrates how to retrieve the value cached for an ASP.NET text box server control.



Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions