Export (0) Print
Expand All

ConnectionPoint.GetEnabled Method

Returns a value that indicates whether a connection point can participate in connections.

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

abstract GetEnabled : 
        control:Control -> bool  
override GetEnabled : 
        control:Control -> bool

Parameters

control
Type: System.Web.UI.Control

A WebPart or other server control that is associated with a connection point.

Return Value

Type: System.Boolean
true if the control can create a connection point to participate in a connection; otherwise, false.

The GetEnabled method in the base ConnectionPoint class always returns true, but derived classes can override the method to return true or false at different times, based on the state of control.

The following code example demonstrates the use of the GetEnabled method on both ProviderConnectionPoint and ConsumerConnectionPoint objects. This code example shows only the Web page that contains the code to access the property; for the full code required to run the example, see the Example section of the ConnectionPoint class overview.

The code in the Button2_Click method of the Web page accesses the GetEnabled method on each of the connection point objects and writes each value to a label. Execute the code by clicking the Connection Point Details button after the page is loaded in a browser.

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

.NET Framework

Supported in: 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.

Show:
© 2014 Microsoft