Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 143
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Professional ASP.NET 3.5 in C# and Visual Basic Part 143. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in ASP.NET 2.0 now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 30 Localization Response.Write b Culture s Parent Name b ci.Parent.Name.ToString br Response.Write b Culture s Display Name b ci.DisplayName.ToString br Response.Write b Culture s English Name b ci.EnglishName.ToString br Response.Write b Culture s Native Name b ci.NativeName.ToString _ br Response.Write b Culture s Three Letter ISO Name b _ ci.Parent.ThreeLetterISOLanguageName.ToString br Response.Write b Calendar Type b ci.Calendar.ToString p End Sub C protected void Page_Load object sender EventArgs e Cultureinfo ci System.Threading.Thread.CurrentThread.CurrentCulture Response.Write b u CURRENT CULTURE S INFO u b Response.Write p b Culture s Name b ci.Name.ToString br Response.Write b Culture s Parent Name b ci.Parent.Name.ToString br Response.Write b Culture s Display Name b ci.DisplayName.ToString br Response.Write b Culture s English Name b ci.EnglishName.ToString br Response.Write b Culture s Native Name b ci.NativeName.ToString br Response.Write b Culture s Three Letter ISO Name b ci.Parent.ThreeLetterISOLanguageName.ToString br Response.Write b Calendar Type b ci.Calendar.ToString p Figure 30-2 1384 Chapter 30 Localization This bit of code in the Page_Load event checks the Currentculture property. You can place the result of this value in a Cultureinfo object. To get at this object you import the System.Globalization namespace into your Web page. The Cultureinfo object contains a number of properties that provides you with specific culture information. The following items which are displayed in a series of simple Response.Write statements are only a small sampling of what is actually available. Running this page produces results similar to what is shown in Figure 30-2. From this figure you can see that the en-US culture is the default setting in which the ASP.NET thread executes. In addition to this you can use the Cultureinfo object to get at a lot of other descriptive information about the culture. You can always change a thread s culture on the