How should you update the Application_Start method?

DRAG DROP
You are developing an ASP.NET MVC application that has pages for users who browse the
site with Windows Phone 7. The pages for Windows Phone 7 include the following files:
• _Layout.WP7.cshtml
• Index.WP7.cshtml
You need to update the application so that it renders the customized files correctly to
Windows Phone 7 users. How should you update the Application_Start method? (To answer,
drag the appropriate line of code to the correct location or locations. Each line of code 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.)

DRAG DROP
You are developing an ASP.NET MVC application that has pages for users who browse the
site with Windows Phone 7. The pages for Windows Phone 7 include the following files:
• _Layout.WP7.cshtml
• Index.WP7.cshtml
You need to update the application so that it renders the customized files correctly to
Windows Phone 7 users. How should you update the Application_Start method? (To answer,
drag the appropriate line of code to the correct location or locations. Each line of code 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.)

Answer:



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Maurizio

Maurizio

1 – 2 – 3

DisplayModeProvider.Instance.Modes.Insert(0, new
DefaultDisplayMode(“WP7”)
{
ContextCondition = (context => context.GetOverriddenUserAgent().IndexOf
(“Windows Phone OS”,
StringComparison.OrdinalIgnoreCase) >= 0)
});

m4

m4

“Windows Phone OS” ? there’s no such thing in the book. I can’t even find in google about that user agent. How did you know that is the answer?

someguy

someguy

The string “Windows Phone OS” is indeed in the user agent string of a WF7.
1 – 2 – 3