ConnectionsZone.InstructionText Property
Assembly: System.Web (in system.web.dll)
public: virtual property String^ InstructionText { String^ get () override; void set (String^ value) override; }
/** @property */ public String get_InstructionText () /** @property */ public void set_InstructionText (String value)
public override function get InstructionText () : String public override function set InstructionText (value : String)
Not applicable.
Property Value
A string that contains the instruction text for the connection UI. The default text is a culture-specific string supplied by the .NET Framework.The text contained in the InstructionText property is visible whenever the connection UI is displayed and a connection already exists. Just below the header text (contained in the HeaderText property), which is found at the top of the connection UI, is the instruction title, and just below that is the instruction text. The instruction text informs users what type of action can be performed on the currently selected WebPart control (the selected control is the one for which the user clicked a connect verb on the control's verbs menu). By default, the instruction text is Manage the connections for the current Web part.
This property overrides the base InstructionText property from the ToolZone class, so that the default connections zone instruction text can be assigned to the property.
You can set the value of this property declaratively within the opening tag of the <asp:connectionszone> element, by adding an attribute named InstructionText and assigning it a value. You can also set the property value programmatically.
The following code example demonstrates the use of the InstructionText 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 programmatically.
-
An explanation of how the example works in a browser.
The Web page declares an <asp:connectionszone> element and, in the Page_PreRender method, the code assigns a value to the InstructionText property.
Load the page in a browser. Switch to connect mode, using the Display Mode control. Click the verbs menu arrow on the ZIP Code Consumer control, and click the connect verb. In the view that opens for the existing connection, note that the instruction text near the top of the connections zone is the value assigned to the InstructionText property in the code example.
Windows 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.