Display modes are new to ASP.NET MVC 4. They allow us to target specific devices based on some matching criteria contained in an
HttpContext, typically a user-agent string. Upon a match, the display mode identifies the suffix appended to any view specific to the device. It is actually this technology underlying the
.Mobile suffix we just learned about.
Display modes are represented by an implementation of the
IDisplayMode interface defined in
System.Web.WebPages. At application startup, implementations of
IDisplayMode can be registered with the current
We will be creating and registering an instance of
IDisplayMode for the Asus Nexus 7. Our new display mode will use a suffix of
nexus7 for any Asus Nexus 7 specific ...