Exam4Training

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:

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?
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");

Answer: C

Explanation:

Only the Resources class is used.

Latest 70-486 Dumps Valid Version with 255 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version