PagesSection.CompilationMode Property

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

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public CompilationMode CompilationMode { get; set; }
/** @property */
public CompilationMode get_CompilationMode ()

/** @property */
public void set_CompilationMode (CompilationMode value)

public function get CompilationMode () : CompilationMode

public function set CompilationMode (value : CompilationMode)

Not applicable.

Property Value

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

The default value is Always.

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

// Get the current CompilationMode property value.
    "Current CompilationMode value: '{0}'",

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions