You create an ASP.NET application to provide corporate news and information to XYZsemployees. The application is used by employees in New Zealand.
Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event handler for Default.aspx included the following line of code:
currentDateLabel.Text = DateTime.Now.ToString(“D”)
You need to ensure that the data is displayed correctly for employees in New Zealand. What should you do?
You create an ASP.NET application to provide corporate news and information to XYZsemployees. The application is used by employees in New Zealand.
Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event handler for Default.aspx included the following line of code:
currentDateLabel.Text = DateTime.Now.ToString(“D”)
You need to ensure that the data is displayed correctly for employees in New Zealand. What should you do? Correct Answer In the Web.config file for the application, set the culture attribute of the globalization element to en-NZ.
The culture attribute of the globalization element specifies the default culture for processing incoming Web requests.
Incorrect Answers:
B: The uiculture attribute of the globalization specifies the default culture for processing locale dependent resource searches. It does not apply in this scenario.
C, D: The UTF8Encoding Class class encodes Unicode characters using UCS Transformation Format, 8-bit form (UTF-8). This encoding supports all Unicode character values and surrogates. However, it does not help in displaying data in New Zealand format.