title: How does mobile switching work in a vs.net 2012 ASP.NET Web Forms Site project
body: <p>I'm in the early stages of investigating how to support a mobile set of pages in an ASP.NET Web Forms Site project.</p>
  
  <p>In previous projects using MVC and Razor we would simply have a .mobile.cshtml version of the page and the ViewEngine would handle the switching between desktop and mobile versions of the page on the server (so for example index.cshtml would be served for a desktop browser and index.mobile.cshtml for mobile).</p>
  
  <p>I had thought that something similar would be in place for web forms projects and to make sure fired up Visual Studio 2012, created an ASP.NET Web Forms site project and voila the template had created both a Site.Master and a Site.Mobile.Master and even included a ViewSwitcher.ascx. However when browsing to the site using either Chrome with the user agent set to one of the mobile strings or using the Electric Plum IPhone simulator I'm always ending up with the desktop version of the page.</p>
  
  <p>I've done some debugging and had a look at the DisplayModeProvider.Instance.Modes collection and there is a Mobile provider and a default provider listed, so I'm a little confused as to what else is required to get the mobile version being rendered.</p>