ConnectionsZone::CancelVerb Property
Gets a reference to a WebPartVerb object that enables end users to cancel the process of establishing a connection.
Assembly: System.Web (in System.Web.dll)
[PersistenceModeAttribute(PersistenceMode::InnerProperty)] public: virtual property WebPartVerb^ CancelVerb { WebPartVerb^ get (); }
Property Value
Type: System.Web.UI.WebControls.WebParts::WebPartVerbA WebPartVerb that enables end users to cancel the process of connecting two controls.
The cancel verb, as used with a ConnectionsZone control, is a zone-level verb that appears in the connection user interface (UI) as part of the view in which users select connection points for the controls. When users click the cancel verb, it cancels the process of selecting connection points, and returns the connections zone view to the hyperlinks that users can click to establish a new connection.
Use the CancelVerb property to get a reference to the corresponding WebPartVerb object in the UI. Although the property itself is read-only, after you have a reference to the verb, you can change its property values as needed.
You can set the property values of the cancel verb declaratively, by declaring the <cancelverb> element within the tags of an <asp:connectionszone> element. The properties of the verb can be set declaratively in the form Property-Subproperty, where Subproperty is a property of the WebPartVerb object (for example, CancelVerb-Text). You can also set the properties programmatically in the form Property.Subproperty (for example, CancelVerb.Text).
The following code example demonstrates the use of the CancelVerb property with a ConnectionsZone control. The example contains only the code for the Web page that demonstrates use of the property; 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, declares an <asp:connectionszone> element, and shows how to use the property declaratively and programmatically.
An explanation of how the example works in a browser.
The Web page declares an <asp:connectionszone> element, and within the element, it declares a <cancelverb> element and sets some properties using attributes. Also, in the Page_PreRender method, the code sets some properties on the cancel verb for the ConnectionsZone control.
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. Click the End Connection button to disconnect the controls that are already connected due to the declarative connection on the page. Click the Select a consumer for the provider to connect with hyperlink, and notice the effect of setting the various properties. If you position your mouse pointer over the Terminate button, the custom description text appears in a ToolTip.
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.