ConnectionPoint.ID Property
Assembly: System.Web (in system.web.dll)
When a developer declares a ConnectionConsumerAttribute or a ConnectionProviderAttribute 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 ID parameter for the connection point attribute. The only required attribute is the displayName parameter. A default ID is assigned to the connection point, using the value from the DefaultID 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.
The following code example demonstrates the use of the ID property 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 ID property 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.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.