ToolZone.InstructionText Property

 

Gets or sets the text in a ToolZone control that provides directions for end users.

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

abstract InstructionText : string with get, set
override InstructionText : string with get, set

Property Value

Type: System.String

A string that contains the directions for end users. A default value appropriate to specific tool zones is provided by derived ToolZone classes.

The InstructionText property is used to hold a set of instructions that are provided for end users when a particular ToolZone control is displayed.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

Notes to Inheritors:

Tool zones in the Web Parts control set that derive from the ToolZone class (see the zones listed in the ToolZone class overview) override the InstructionText property to provide default instructions for end users.

The following code example shows how to use the InstructionText property with an inherited ToolZone control. The example shows how to change the value of the instruction text that appears in an EditorZone control by using this property.

The first part of the code example is a user control that is referenced in the page, and enables you to switch the page to different display modes. For more information on display modes and enabling users to switch among them, see Walkthrough: Changing Display Modes on a Web Parts Page.

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

The second part of the code example shows a partial class that contains the code to update the property programmatically in the Button1_Click method.

System_CAPS_security Security Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

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

The third part of the code example shows a Web page that contains two inherited ToolZone controls: a CatalogZone control and an EditorZone control. Each ToolZone control sets some properties in the declarative markup of the page.

System_CAPS_security Security Note

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

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

You can load the page in a browser and switch among the various page display modes to see how the different tool zones behave. Switch the page into edit mode, enter some text into the text box, and click Update Edit Zone Text to see the effect of programmatically updating the InstructionText property. The instruction text appears near the top of the zone.

.NET Framework
Available since 2.0
Return to top
Show: