This documentation is archived and is not being maintained.

BuildManager.BatchCompilationEnabled Property

Gets or sets a value that indicates whether batch compilation is enabled.

Namespace:  System.Web.Compilation
Assembly:  System.Web (in System.Web.dll)

public static Nullable<bool> BatchCompilationEnabled { get; set; }

Property Value

Type: System.Nullable<Boolean>
true if batch compilation is always enabled, false if batch compilation is never enabled, or null if the compilation setting is determined from the configuration file. The default value is null.

ExceptionCondition
InvalidOperationException

The property was not set in the PreApplicationStart method.

This property enables you to turn batch compilation on or off programmatically. It corresponds to the batch attribute of the compilation element in the Web.config file. For more information, see compilation Element (ASP.NET Settings Schema).

The property can be set only in the PreApplicationStart method. For more information about the PreApplicationStart method, see PreApplicationStartMethodAttribute.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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