ASP.NET Syntax ASP.NET Configuration Sections
Configures the globalization settings of an application.
<globalization
culture = "any valid culture string"
enableBestFitResponseEncoding = "true | false"
enableClientBasedCulture = "true | false"
fileEncoding = "any valid encoding string"
requestEncoding = "any valid encoding string"
responseHeaderEncoding = "any valid encoding string"
responseEncoding = "any valid encoding string"
resourceProviderFactoryType = string
uiCulture = "any valid culture string"
/>
The <globalization
> tag supports five attributes.
Attribute |
Description |
culture |
Specifies the default culture for processing incoming Web requests. For valid culture strings, see System.Globalization.CultureInfo Class. |
enableClientBasedCulture |
specifies whether the culture and uiCulture properties should be based on the AcceptLanguage header field value that is sent by the client browser. |
fileEncoding |
Specifies the default encoding for .aspx, .asmx, and .asax file parsing. |
requestEncoding |
Specifies the assumed encoding of each incoming request. The default encoding is specified in the <globalization > tag included in the machine.config file created when the .NET Framework is installed. For English-language systems, the default is "iso-8859-1". If request encoding is not specified in a machine.config or web.config file, encoding defaults to the computer’s Regional Options locale setting. |
responseEncoding |
Specifies the content encoding of responses. The default encoding is specified in the <globalization > tag included in the machine.config file created when the .NET Framework is installed. For English language systems, the default is "iso-8859-1". If response encoding is not specified in a machine.config or web.config file, encoding defaults to the computer’s Regional Options locale setting. |
uiCulture |
Specifies the default culture for processing locale-dependent resource searches. For valid culture strings, see System.Globalization.CultureInfo Class. |
The following code example demonstrates how to specify the default request and response encoding for an ASP.NET application.
<configuration>
<system.web>
<globalization
requestEncoding = "iso-8859-1"
responseEncoding = "iso-8859-1" />
</system.web>
</configuration>
ASP.NET Globalization GlobalizationSection Class ASP.NET Configuration