BuildManager::BatchCompilationEnabled Property
Gets or sets a value that indicates whether batch compilation is enabled.
Assembly: System.Web (in System.Web.dll)
public: static property Nullable<bool> BatchCompilationEnabled { Nullable<bool> get (); void set (Nullable<bool> value); }
Property Value
Type: System::Nullable<Boolean>true if batch compilation is always enabled, false if batch compilation is never enabled, or nullptr if the compilation setting is determined from the configuration file. The default value is nullptr.
| 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.
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.