nerdexam
Microsoft

70-515 · Question #5

You are implementing an ASP.NET Web site. The site allows users to explicitly choose the display language for the site's Web pages. You create a Web page that contains a DropDownList named…

The correct answer is B. protected override void InitializeCulture(). See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET Web site. The site allows users to explicitly choose the display language for the site's Web pages. You create a Web page that contains a DropDownList named ddlLanguage, as shown in the following code segment. <asp:DropDownList ID="ddlLanguage" runat="server" AutoPostBack="True" ClientIDMode="Static" OnSelectedIndexChanged="SelectedLanguageChanged"> <asp:ListItem Value="en">English</asp:ListItem> <asp:ListItem Value="es">Spanish</asp:ListItem> <asp:ListItem Value="fr">French</asp:ListItem> <asp:ListItem Value="de">German</asp:ListItem> </asp:DropDownList> The site contains localized resources for all page content that must be translated into the language that is selected by the user. You need to add code to ensure that the page displays content in the selected language if the user selects a language in the drop-down list. Which code segment should you use?

Options

  • Aprotected void SelectedLanguageChanged(object sender, EventArgs e)
  • Bprotected override void InitializeCulture()
  • Cprotected void Page_Load(object sender, EventArgs e)
  • Dprotected override void InitializeCulture()

How the community answered

(52 responses)
  • A
    4% (2)
  • B
    73% (38)
  • C
    15% (8)
  • D
    8% (4)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice