CompilationSection.DefaultLanguage Property

Gets or sets the default programming language to use in dynamic-compilation files.

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

public string DefaultLanguage { get; set; }
/** @property */
public String get_DefaultLanguage ()

/** @property */
public void set_DefaultLanguage (String value)

public function get DefaultLanguage () : String

public function set DefaultLanguage (value : String)

Not applicable.

Property Value

A value specifying the default programming language to use in dynamic-compilation files.

Specifies the default programming language, such as C# or VB.NET, to use in dynamic compilation files. Language names are defined using the system.codedom section. The default programming language is vb, which specifies VB.NET as the default programming language.

The following code example demonstrates how to use the DefaultLanguage property. This code example is part of a larger example provided for the CompilationSection class.

// Display DefaultLanguage property.
Console.WriteLine("DefaultLanguage: {0}",

// Set DefaultLanguage property.
configSection.DefaultLanguage = "vb";

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