I’m trying to make my Action return a different view for different platforms, respecting the routing config. Is there something built-in that can handle this? Or would I need to create a custom ViewResult to handle this? I’m not as concerned about the actual detection of platform as I am about rendering the view.
For example:
HomeController.About action would display View\Home\About.cshtml on computer, View\Home\AboutTablet.cshtml on a tablet, and View\Home\AboutMobile.cshtml on a cell phone.
You would need to write your own ViewResult to contain a mapping (a naming convention would make your life easier) for views.
One other idea that may or may not work for you. You could kick the user over to something like http://yoursite.com/tablet or http://yoursite.com/mobile and then use a different layout for all your pages.