Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ScriptManager.ScriptMode Property

Gets or sets a value that specifies whether debug or release versions of client script libraries are rendered.

Namespace:  System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)
public ScriptMode ScriptMode { get; set; }
<asp:ScriptManager ScriptMode="ScriptMode" />

Property Value

Type: System.Web.UI.ScriptMode
The enumeration value that indicates the current mode. The default is Auto.
ExceptionCondition
ArgumentOutOfRangeException

The ScriptMode property is not one of the ScriptMode values.

The ScriptMode property specifies whether the ScriptManager control should render debug or release versions of client script libraries. This value can be superseded by values that are set in the configuration file and in the page directive.

The following table lists the valid values for this property.

Value

Definition

Auto

Debug versions of client script libraries are used in the Web page when the retail attribute of the deployment configuration element is set to false. Otherwise, the release versions of client script libraries are used.

Inherit

When applied to the ScriptMode property of the ScriptManager object, this value is the same as Auto.

Debug

Debug versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to true.

Release

Release versions of client script libraries are used in the Web page unless the retail attribute of the deployment configuration element is set to false.

NoteNote

The debug attribute of the @ Page directive does not affect Ajax-enabled ASP.NET applications. The ScriptManager control uses only the settings in the Web.config file and in its IsDebuggingEnabled and ScriptMode properties to determine whether to render debug scripts.

For more information, see Debugging and Tracing Ajax Applications Overview.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.