Microsoft KB Archive/326943

= HOW TO: Set Culture Information in an ASP.NET Application Without Code =

Article ID: 326943

Article Last Modified on 5/18/2007

-

APPLIES TO


 * Microsoft ASP.NET 1.1
 * Microsoft ASP.NET 1.0

-



This article was previously published under Q326943





SUMMARY
This article describes how to set the culture for an ASP.NET application, both at the page level and at the Web application level. By default, ASP.NET supports the cultures that are listed at the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo(vs.71).aspx

Set the Culture at the Page Level
To set the culture at page level, add the culture attribute to the page directive. For example, the Page directive for a default page that is created in Visual Studio .NET may be: <%@ Page language=&quot;c#&quot; Codebehind=&quot;test.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;myweb.test&quot; %> By default, this page uses the culture that is specified by the Web server. To change the culture for this page, add the culture attribute. For example, to change this page culture to Arabic - Yemen, change the page directive to read: <%@ Page language=&quot;c#&quot; Culture=&quot;ar-YE&quot; Codebehind=&quot;test.aspx.cs&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;myweb.test&quot; %>

Set the Culture at the Web Application Level
To set the culture at the Web application level, modify or add the tag in the  section of the Web.config file. By default, Visual Studio .NET creates a Web.config file, and it contains the following section.  To change the culture, add the culture attribute, and then specify the culture name. For example, to change the culture to Arabic - Yemen, change the tag to read: 

