Setting a Culture Manually

You can set either the UICulture or Culture properties by using the <%@ Page %> directive. For example, the page in Listing 30.1 sets both properties to the value id-ID (Indonesian).

Listing 30.1. Bagus.aspx

images

images

The page in Listing 30.1 displays a date and a currency amount. Because the Culture property is set to the value id-ID in the <%@ Page %> directive, both the date and currency amount are formatted with Indonesian cultural conventions (see Figure 30.1).

Figure 30.1. Displaying a localized date and price.

The date ...

Get ASP.NET 4 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.