This documentation is archived and is not being maintained.

WebPartDisplayMode.WebPartDisplayMode Constructor

Initializes a value for the name of the display mode.

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

protected WebPartDisplayMode (
	string name
protected WebPartDisplayMode (
	String name
protected function WebPartDisplayMode (
	name : String
Not applicable.



The name of the display mode.

Exception typeCondition


The name parameter is a null reference (Nothing in Visual Basic).

A WebPartDisplayMode object is never created because the class is abstract. At run time, the WebPartManager control uses the WebPartDisplayMode class as the base class to create objects for each of the various page display modes.

Notes to Inheritors: If you derive from the WebPartDisplayMode class to create a custom display mode, in your class declaration you must call the base constructor and pass to it a string containing the name of the custom display mode.

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