共用方式為


WebPart.BrowserDesignMode Property

NOTE: This API is now obsolete.

Gets whether a Web Part is in design mode (modifying its layout or properties) in the Web browser.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use WebPartManager.DisplayMode instead.")> _
Public ReadOnly Property BrowserDesignMode As Boolean
    Get
'Usage
Dim instance As WebPart
Dim value As Boolean

value = instance.BrowserDesignMode
[ObsoleteAttribute("Use WebPartManager.DisplayMode instead.")]
public bool BrowserDesignMode { get; }

Property Value

Type: System.Boolean
true if the Web Part is in a design mode; otherwise, false.

Remarks

The BrowserDesignMode property is available only at run time. The BrowserDesignMode property can be useful if the Web Part does not display a user interface when viewed at browse time, but needs to display a user interface while being edited. It is also useful to avoid unnecessary work when properties and layout changes are being applied, as these changes can cause many postbacks to the server. The value of the BrowserDesignMode property is available during or after the System.Web.UI.Control.PreRender event occurs.

See Also

Reference

WebPart Class

WebPart Members

Microsoft.SharePoint.WebPartPages Namespace