Muokkaa

Jaa


PagesSection.CompilationMode Property

Definition

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

public:
 property System::Web::UI::CompilationMode CompilationMode { System::Web::UI::CompilationMode get(); void set(System::Web::UI::CompilationMode value); };
[System.Configuration.ConfigurationProperty("compilationMode", DefaultValue=System.Web.UI.CompilationMode.Always)]
public System.Web.UI.CompilationMode CompilationMode { get; set; }
[<System.Configuration.ConfigurationProperty("compilationMode", DefaultValue=System.Web.UI.CompilationMode.Always)>]
member this.CompilationMode : System.Web.UI.CompilationMode with get, set
Public Property CompilationMode As CompilationMode

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.

// 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;
' 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

See also