Tags

,


Set language in Asp.Net

Web Forms configuration files, named Web.config, provide settings for every Web Forms page in the same directory as the configuration file. The settings are usually also inherited by subdirectories. Each file can contain a globalization section in which you can specify default encodings and cultures.

The attributes of the globalization section in the Web.config file can also be specified in the @ Page directive (with the exception of fileEncoding, which can only be specified in Web.config because it applies to the file itself). Settings in the Page directive are only valid for a specific page and override the settings of the Web.config file.

 

<configuration>
<system.web>
<globalization
fileEncoding=”utf-8″
requestEncoding=”utf-8″
responseEncoding=”utf-8″
culture=”en-US”
uiCulture=”de-DE”
/>
</system.web>
</configuration>

 

Enjoy!!

Advertisements