WebPartManager.BeginWebPartConnecting(WebPart) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts the process of connecting two WebPart controls.
public:
virtual void BeginWebPartConnecting(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
public virtual void BeginWebPartConnecting (System.Web.UI.WebControls.WebParts.WebPart webPart);
abstract member BeginWebPartConnecting : System.Web.UI.WebControls.WebParts.WebPart -> unit
override this.BeginWebPartConnecting : System.Web.UI.WebControls.WebParts.WebPart -> unit
Public Overridable Sub BeginWebPartConnecting (webPart As WebPart)
Parameters
- webPart
- WebPart
The control for which the connection is being formed.
Exceptions
webPart
is null
.
The current display mode on the page is not ConnectDisplayMode.
webPart
is closed.
-or-
webPart
is not part of the Controls collection.
-or -
webPart
is equal to the SelectedWebPart control.
Remarks
The BeginWebPartConnecting method exists so that the process of forming connections between controls can be done in distinct stages, giving developers more control over the connection process. The method performs a set of initial checks to ensure that webPart
is in a state where a connection can legitimately be formed. If webPart
passes all the checks, it is then set as the currently selected control (see the SelectedWebPart property), and the connecting process can continue.
Notes to Inheritors
Developers who need to extend the WebPartManager control might want to override this method in a derived class. One approach would be to call the base method, and then add some additional custom handling; or you might want to completely customize the process of starting a connection between controls. For example, you might want to verify that certain data is available before creating the connection.