Ottiene l'oggetto HttpContext associato al controllo server per la richiesta Web corrente.
Assembly: System.Web (in System.Web.dll)
<BrowsableAttribute(False)> _ Protected Friend Overridable ReadOnly Property Context As HttpContext Get
[BrowsableAttribute(false)] protected internal virtual HttpContext Context { get; }
[BrowsableAttribute(false)] protected public: virtual property HttpContext^ Context { HttpContext^ get (); }
[<BrowsableAttribute(false)>] abstract Context : HttpContext [<BrowsableAttribute(false)>] override Context : HttpContext
Valore proprietà
Tipo: System.Web.HttpContextOggetto HttpContext specificato associato alla richiesta corrente.
Questa proprietà fornisce l'accesso all'oggetto HttpContext per la richiesta Web corrente. L'oggetto fornisce le proprietà per l'accesso agli oggetti Application, Session, Request, Response e ad altri oggetti che contengono informazioni sulla richiesta HTTP corrente. Fornisce anche i metodi che consentono di ottenere informazioni sulla configurazione e di impostare o eliminare gli errori relativi alla richiesta.
<System.Security.Permissions.PermissionSetAttribute( _
System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Protected Overrides Function OnBubbleEvent(ByVal sender As Object, ByVal e As EventArgs) As Boolean
' Use the Context property to write text to the TraceContext object
' associated with the current request.
Context.Trace.Write("The ParentControl's OnBubbleEvent method is called.")
Context.Trace.Write("The Source of event is: " + sender.ToString())
Return True
End Function 'OnBubbleEvent
protected override bool OnBubbleEvent(object sender, EventArgs e) { // Use the Context property to write text to the TraceContext object // associated with the current request. Context.Trace.Write("The ParentControl's OnBubbleEvent method is called."); Context.Trace.Write("The Source of event is: " + sender.ToString()); return true; }
.NET Framework
Supportato in: 4, 3.5, 3.0, 2.0, 1.1, 1.0Windows 7, Windows Vista SP1 o versione successiva, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (componenti di base del server non supportati), Windows Server 2008 R2 (componenti di base del server supportati con SP1 o versione successiva), Windows Server 2003 SP2
.NET Framework non supporta tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.