This documentation is archived and is not being maintained.

WebPartTracker Class

Monitors Web Parts connections for circular connections.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class WebPartTracker : IDisposable

A Web Parts connection is a link or association between two WebPart (or other server or user) controls that enables them to share data. In every Web Parts connection, one control acts as a provider of data and another as a consumer of data.

When a Web Parts control is both a provider and a consumer, and the provided data depends on the consumed data, there is the possibility of creating a connection that results in an infinite loop between Web Parts controls. These loops are called circular connections. A developer can prevent a circular connection by using the WebPartTracker class to track the number of connections for a provider connection point and a Web Parts control. The provider connection point and the control are specified in the WebPartTracker constructor.

If a circular connection is detected, the WebPartTracker object sets the WebPart.ConnectErrorMessage property on the provider Web Parts control. The IsCircularConnection property will return true.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0