MCSD-Microsoft Certified Solutions Developer Question & Answers
You create an ASP.NET application to provide corporate news and information to XYZ’s employees. 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?
|A) In the Web.config file for the application, set the culture attribute of the globalization element to en-NZ.||B) In the Web.config file for the application, set the uiCulture attribute of the globalization element to en-NZ.|
|C) In Visual Studio .NET, set the responseEncoding attribute in the page directive for Default.aspx to UTF-8.||D) In Visual Studio .NET, save the Default.aspx page for both versions of the application by selecting Advanced Save Options from the File menu and selecting UTF-8.|
The culture attribute of the globalization element specifies the default culture for processing incoming Web requests.
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.
- Related Questions