PagesSection.CompilationMode Property

Definition

Gets or sets a value that determines how .aspx pages and .ascx controls are compiled.

C#
[System.Configuration.ConfigurationProperty("compilationMode", DefaultValue=System.Web.UI.CompilationMode.Always)]
public System.Web.UI.CompilationMode CompilationMode { get; set; }

Property Value

One of the values for the CompilationMode property, which specifies how .aspx pages and .ascx controls are compiled.

Attributes

Examples

The following code example shows how to use the CompilationMode property.

C#
// Get the current CompilationMode property value.
Console.WriteLine(
    "Current CompilationMode value: '{0}'",
    pagesSection.CompilationMode);

// Set the CompilationMode property to CompilationMode.Always.
pagesSection.CompilationMode = CompilationMode.Always;

Remarks

The default value is Always.

Applies to

Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also