BuildManager.BatchCompilationEnabled Property

.NET Framework (current version)
 

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.

Exception Condition
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
Available since 4.0
Return to top
Show: