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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.