Export (0) Print
Expand All

ConsumerConnectionPoint.SupportsConnection Method

Determines whether a consumer connection point is currently capable of establishing a connection.

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

public virtual bool SupportsConnection(
	Control control,
	ConnectionInterfaceCollection secondaryInterfaces


Type: System.Web.UI.Control

The consumer control associated with the ConsumerConnectionPoint.

Type: System.Web.UI.WebControls.WebParts.ConnectionInterfaceCollection

A ConnectionInterfaceCollection of any secondary interfaces that participate in a connection.

Return Value

Type: System.Boolean
true if a connection point can currently establish a connection; otherwise, false. The default is true.

The SupportsConnection method as implemented always returns true in all cases for the ConsumerConnectionPoint class. The intent for this method is to have it check on the state of control and secondaryInterfaces at certain critical points to determine whether a ConsumerConnectionPoint object is presently able to create a connection.

There can be scenarios where control is in a state that would make it impossible to form a connection, or where secondaryInterfaces must exist before a connection can be formed. In such cases, developers can inherit from the ConsumerConnectionPoint class, and override the SupportsConnection method, providing a custom implementation to determine when the connection point is ready to support connections.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft