Export (0) Print
Expand All

WebPartManager.EnableClientScript Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value that determines whether client-side scripting is enabled on the Web page that contains a WebPartManager control.

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

public virtual bool EnableClientScript { get; set; }
/** @property */
public boolean get_EnableClientScript ()

/** @property */
public void set_EnableClientScript (boolean value)

public function get EnableClientScript () : boolean

public function set EnableClientScript (value : boolean)

Property Value

A Boolean value that indicates whether client script can run on the page. The default value is true.

The EnableClientScript property provides a way for developers to disable client scripts. You might want to disable client scripting for security purposes, or to ensure that all users of a page will have a similar user experience, even if they use different browsers.

You can disable client scripting by adding an EnableClientScript attribute to the WebPartManager element on a Web page, as in the following line of declarative code:

<asp:webpartmanager id="manager" runat="server"

EnableClientScript="false" />

Also, developers could eliminate this property by inheriting from the WebPartManager class and setting the default value to false.

The Web Parts control set uses client scripting to provide some of the client user interface (UI) and personalization features. If you disable client scripting, Web Parts controls still work, but some features are disabled. The ability to drag controls into different zones is disabled, along with the ability to render verbs in a drop-down verbs menu in a control's title bar (the verbs are instead displayed as links in the control's title bar).

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

© 2014 Microsoft