This documentation is archived and is not being maintained.

ConnectionsZone Constructor

Initializes a new instance of the ConnectionsZone class.

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

public:
ConnectionsZone()

This default constructor is called when you declare the <asp:connectionszone> element in an ASP.NET page. You do not need to implicitly call this constructor, except in cases where you are adding the control to the page programmatically.

The following code example demonstrates the use of the ConnectionsZone constructor to create a new instance of a ConnectionsZone control to add to a Web page programmatically. The example contains only the code for the Web page that demonstrates use of the constructor; for the other two code files needed to run the example, see the Example section of the ConnectionsZone class overview. The code example has four parts:

  • A user control that enables you to switch display modes on the Web page. Obtain this code from the ConnectionsZone class overview.

  • A source file that contains the code for a ZIP Code interface, and two WebPart controls acting as the provider and the consumer for a connection. Obtain this code from the ConnectionsZone class overview.

  • A Web page that hosts all the controls and, in its Page_Init method, uses the ConnectionsZone constructor to create a new instance of the ConnectionsZone control and add it to the page.

  • An explanation of how the example works in a browser.

On the Web page, in the Page_Init method, a new ConnectionsZone control is created (using the constructor) and added to the page. When a user sets the page to connect mode and clicks the connect verb on one of the WebPart controls, a ConnectionsZone control appears.

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

Load the page in a browser. Switch to connect mode, using the Display Mode control. Click the verbs menu arrow on the ZIP Code Provider control, and click the connect verb. The connection UI appears, and the controls are already connected because the connection was declared in the markup of the page.

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
Show: