WebPartZoneBase.EmptyZoneText Property

Gets or sets a message that appears when a WebPartZoneBase control contains no WebPart controls.

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

public:
virtual property String^ EmptyZoneText {
	String^ get () override;
	void set (String^ value) override;
}
/** @property */
public String get_EmptyZoneText ()

/** @property */
public void set_EmptyZoneText (String value)

public override function get EmptyZoneText () : String

public override function set EmptyZoneText (value : String)

Not applicable.

Property Value

A string containing the message that appears in an empty zone. A default culture-specific string is supplied by the .NET Framework.

The EmptyZoneText property overrides the base property to distinguish between cases where the property has not been set and those where it has been set to an empty string ("").

If the property has not been set and the zone contains no controls, when a Web Parts page enters into a display mode where the zone is visible, a default culture-specific text message appears in an empty WebPartZoneBase control. If the EmptyZoneText property value has intentionally been set to an empty string, then no text message appears in an empty zone.

The following code example demonstrates the declarative use of the EmptyZoneText property on a WebPartZone control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the WebPartZoneBase class overview.

Notice that the EmptyZoneText property has a value assigned to it in the declarative markup. This value will appear in WebPartZone2, after you load the page into a browser, switch the page into design display mode, and drag the control that displays the date from WebPartZone2 into WebPartZone1. For more information on changing display modes in a Web Parts page, see Walkthrough: Changing Display Modes on a Web Parts Page.

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

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.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: