TraceContextRecord.Category Property

Gets the user-defined category for the trace record.

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

public:
property String^ Category {
	String^ get ();
}
/** @property */
public String get_Category ()

public function get Category () : String

Not applicable.

Property Value

A string that represents a category for the trace record.

The category is used to better organize trace messages into recognizable groups, but can be any string. The TraceContext class uses String.Empty as its default category for methods that take only a message parameter. The default category for ASP.NET, which writes several trace records when tracing is enabled, is "aspx.page".

The following code example demonstrates how to access the Category property of a TraceContextRecord, and print it and its associated trace message to the Response stream.

No code example is currently available or this language may not be supported.

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

Community Additions

ADD
Show: