This documentation is archived and is not being maintained.
Page::Context Property
Visual Studio 2010
Gets the HttpContext object associated with the page.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System.Web::HttpContextAn HttpContext object that contains information associated with the current page.
The following code example uses the Context property to access the HttpContext::AddError and HttpContext::ClearError methods and the HttpContext::AllErrors property. The example creates three custom exceptions using the AddError method and uses the AllErrors property to load these exceptions to an array. It then writes the array to the containing page and uses the ClearError method to clear all the errors from the Context property.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: