exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 45 discussion

Actual exam question from Microsoft's 70-486
Question #: 45
Topic #: 1
[All 70-486 Questions]

DRAG DROP -
You are developing an ASP.NET MVC application in Visual Studio 2012. The application will be viewed with browsers on desktop devices and mobile devices.
The application uses the Razor View Engine to display data.
The application contains two layouts located in the /Views/Shared directory.
These layouts are named:
✑ _Layout.cshmtl
✑ _MobleLayoutcshtml
The application must detect if the user is browsing from a mobile device. If the user is browsing from a mobile device, the application must use the
_MobileLayout.cshtml file. If the user is browsing from a desktop device, the application must use _Layout.cshtml.
You need to ensure that the application renders the layout that is appropriate for the browser.
You have the following code:

Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code of the ViewStart.cshtml file? (To answer, drag the appropriate code segments to the correct targets. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hungry_ape9000
Highly Voted 5 years, 2 months ago
FINAL ANSWER: Request.Browser.IsMobileDevice Layout = "~/Views/Shared/_MobileLayout.cshtml"; Layout = "~/Views/Shared/_Layout.cshtml";
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...