System.Web 2.0.0.0 System.Object

Every Web Parts connection consists of two server controls sharing data: one control is the consumer, the other is the provider. For a discussion of the essential components of a Web Parts connection, and the connection object itself, see the class overview. Every Web Parts connection requires connection points. The provider and the consumer control must each have at least one defined object (each of them can optionally have multiple connection points) that contains the details for how a control can connect to another control and the type of data it can share. In an actual connection, the provider has its own type of connection point object (derived from the base class), a instance, and the consumer has its own object, a instance.

To create a provider connection point, developers must add a callback method to the provider that will return an implemented interface instance to a consumer. They must mark the callback method in the source code with a ConnectionProvider code attribute (see the class). Similarly, to create a consumer connection point, developers must add a method to the consumer that receives an interface instance, and they must mark that method with a ConnectionConsumer attribute (see the class).

When developers create connections on a Web page, they can be created as static or dynamic connections. Static connections are declared in the markup of a Web page. When a static connection is declared, developers can designate which connection points are used for both the consumer and provider by assigning values to the ProviderConnectionPointID and ConsumerConnectionPointID attributes within the <asp:webpartconnection> element tag. This approach is especially useful if there are multiple connection points defined within the consumer and provider controls, because it enables the static connection to identify which connection points to use for the connection.

Dynamic connections are created programmatically, either by a developer's code or by users through the user interface (UI) provided by the control. To create a connection in code, developers must get an instance of a object by calling the method on the control. Before they can call this method, developers must have references to the consumer and provider server controls and their respective connection point objects. To get references to the connection points for a provider and a consumer control, developers first call the and methods on the control. These methods return the appropriate connection point objects, which in turn can be passed to the method for creating a connection.

When the provider's and the consumer's connection point objects both work with the same type of interface, they are compatible and can form a direct connection to share data. If they do not work with the same interface type, a object must be used to translate the interface instance from the provider into a type that the consumer can work with.

The abstract class provides the base details of connection points that are shared by both consumer and provider controls. Several properties contain these details. The property indicates whether a connection point can participate in more than one connection at a time. By default, provider connection points can participate in multiple connections, and consumer connection points cannot. The property indicates the type of the server control associated with a connection point. Note that not only controls can form connections; any server control, whether an ASP.NET control, a custom control, or a user control, can be enabled to participate in connections if placed in a zone. The property provides a friendly name for the connection point that can be displayed in the UI to assist users who are creating connections. The property serves as a string identifier for the connection point object itself. The property indicates what type of interface instance the connection point understands. Whether a given connection point provides or consumes an instance of that interface is determined by whether it is a or a object.

The class has one method. The method returns a Boolean value indicating whether a connection point is currently able to participate in connections.

The class also has one public field, . This field contains a value used to identify the default connection point in a connection.

The attributes for specifying connection point methods have only one required parameter, , so it is possible to create the default connection point attribute without specifying an ID. In such cases, the field supplies a base value to use.

Serves as the base class for defining connection point objects that enable the consumer control and the provider control in a Web Parts connection to share data.

- Property
  System.Boolean To be added.

  objects have their property value set to true (by the class), because the Web Parts control set by default enables provider connection points to form connections to multiple consumers.

  In contrast, objects have their property value set to false (by the class) because the Web Parts control set by default allows consumer connection points to establish a connection to only one provider at a time.

  You can change the default behavior concerning multiple connections by assigning different values to the property (for providers) or the property (for consumers) on the two classes used for connection attributes. If you enable consumer connection points to connect to multiple providers at the same time, your code must deal with any resulting synchronization issues.

  Gets a value that indicates whether a connection point supports multiple simultaneous connections.

  2.0.0.0
- Property
  System.Type To be added.

  The value of the property is often the type. However, because any type of user control or server control can participate in connections if it is properly enabled and placed in a zone, the property can return one of these other server control types as well.

  When server controls that are not controls are placed in a zone, they are wrapped with a object at run time so they can function as controls and participate in connections. But when such controls are involved in connections, the property value does not return the type; it returns the type of the object's child control, which is the type of the server or user control.

  Gets the of the server control with which a connection point is associated.

  2.0.0.0
- Field
  System.String

  When a connection point is created, it is possible to specify an ID for the connection point in the source code of a consumer or provider control, using a or a attribute. However, when an attribute is added to a connection point in the source code, the parameter is optional. If the ID is not specified in the attribute, the field provides a string that is used to identify the default connection point.

  If multiple connection points are defined in a consumer or provider control, it is necessary to specify an ID for each connection point, so that the connection points can be distinguished when creating connections.

  Represents a string used to identify the default connection point within a collection of connection points associated with a server control.

  2.0.0.0
- Method
  System.Boolean ``

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

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

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

  A or other server control that is associated with a connection point. 2.0.0.0
- Property
  System.String To be added.

  When a developer declares a or a attribute on a method in the source code of a control, so that the method can be used as a connection point, it is not required to declare the parameter for the connection point attribute. The only required attribute is the parameter. A default ID is assigned to the connection point, using the value from the field.

  If there is only one method in a control being used as a connection point, it is unnecessary to specify an ID for the connection point. If there are multiple methods specified as connection points, you must specify an ID for each one; otherwise, an exception will be thrown. By assigning an ID to each connection point, you also make it possible to specify which connection point to use when you declare connections in Web pages or create them in code.

  Gets a string that contains the identifier for a connection point.

  2.0.0.0
- Property
  System.Type To be added.

  The property indicates what type of interface a connection point uses. This can help to determine whether two controls are compatible and able to form a connection. If the provider connection point's is different from the consumer connection point's , then the two controls are incompatible (meaning that they cannot be directly connected without a transformer), and a object must be used to establish a connection.

  Gets the type of the interface used by a connection point.

  2.0.0.0
- Property
  System.String To be added. To be added. To be added. 2.0.0.0