PrepAway - Latest Free Exam Questions & Answers

Which code segment should you add to the action at line 03?

You are developing an ASP.NET MVC application in Visual Studio 2012. The application
supports multiple cultures. The application contains three resource files in the Resources
directory:
• My Dictionary.resx
• MyDictionary.es.resx
• MyDictionary.fr.resx
Each file contains a public resource named Title with localized translation. The application is
configured to set the culture based on the client browser settings. The application contains a
controller with the action defined in the following code segment. (Line numbers are included
for reference only.)

You need to set ViewBag.Title to the localized title contained in the resource files. Which
code segment should you add to the action at line 03?

PrepAway - Latest Free Exam Questions & Answers

A.
ViewBag.Title = HttpContext.GetGlobalResourceObuect(“MyDictionary”, “Title”);

B.
ViewBag.Title = HttpContext.GetGlobalResourceObject(“MyDictionary”, “Title”,
new System.Globalization.CultureInfo(“en”));

C.
ViewBag.Title = Resources.MyDictionary.Title;

D.
ViewBag.Title = HttpContext.GetLocalResourceObject(“MyDictionary”, “Title”);

5 Comments on “Which code segment should you add to the action at line 03?


Leave a Reply