Gets a value that indicates whether a WebPartConnection object is declared in the markup of a Web page, or created programmatically.
Assembly: System.Web (in System.Web.dll)
Connections between Web Parts controls can be either static or dynamic. A static connection is declared in the markup of a Web page, using an <asp:WebPartConnection> element. Dynamic connections are created programmatically or when a user creates a connection through the user interface (UI) defined by the ConnectionsZone control.
Static connections are shared objects, meaning they are available to all users of the Web page. Also, they are essentially permanent because, like a static WebPart control, they cannot be permanently deleted.
While a static connection object cannot be permanently deleted, it can be permanently disconnected. In this case, the disconnected object would exist on the server, but an end user would never be aware of the object's existence in a page.
The following code example demonstrates the programmatic use of theproperty.
The code example has three parts:
Source code for an interface and two WebPart controls acting as the provider and the consumer for a connection.
A Web page to host the controls and run the code example.
An explanation of how to run the example page.
The first part of the code example is the source code for the interface, and the consumer and provider controls. For the code example to run, you must compile this source code. You can compile it explicitly and put the resulting assembly in your Web site's Bin folder or the global assembly cache. Alternatively, you can put the source code in your site's App_Code folder, where it will be dynamically compiled at run time. This code example uses dynamic compilation. For a walkthrough that demonstrates how to compile, see Walkthrough: Developing and Using a Custom Web Server Control.
The second part of the code example is the Web page. Near the top is a Register directive that refers to the source code for the two dynamically compiled WebPart controls. The static connection is declared within the <StaticConnections> element on the page. The Button1_Click method accesses the property to check whether the connection is static.
Load the page in a browser. The static connection is already created. Enter some text in the provider control, and note that the text is displayed in the consumer control. Click the Connection Details button to display the value of theproperty.
Available since 2.0