title: Specific View (Asp.net MVC) for IPhone, Android
body: <p>I am using ..</p>
  
  <ul>
  <li><code>ASP.net MVC 4</code></li>
  <li><code>51Degrees.mobi</code></li>
  <li><code>jQuery Mobile</code></li>
  </ul>
  
  <p>By the helping of these technologies, I can make my web application's UI designs look good not only at Desktop based browsers but also at mobile based browsers without requiring me to create projects separately.</p>
  
  <p>But when it comes to more specific mobile devices, I would like to call specific view file.<br>
  So I use below code at <code>Global.asax</code> file.</p>
  
  <pre><code>    protected void Application_Start()
      {
          AreaRegistration.RegisterAllAreas();
          //The Android view
          DisplayModes.Modes.Insert(0, new DefaultDisplayMode("android")
          {                
              ContextCondition = Context =&gt; Context.Request.Browser.Platform == "Android"
          });
  
          //The iPhone view
          DisplayModes.Modes.Insert(0, new DefaultDisplayMode("iphone")
          {
              ContextCondition = Context =&gt; Context.Request.Browser.MobileDeviceModel == "iPhone"                
          });
  
          //The mobile view
          //This has a lower priority than the other two so will only be used by a mobile device
          //that isn't Android or iPhone
          DisplayModes.Modes.Insert(1, new DefaultDisplayMode("mobile")
          {
              ContextCondition = Context =&gt; Context.Request.Browser.IsMobileDevice                
          });
  
          RegisterGlobalFilters(GlobalFilters.Filters);
          RegisterRoutes(RouteTable.Routes);
      }
  </code></pre>
  
  <p>Unfortunately, <code>Android and IPhone specific view</code> do not load whenever I call pages from IPhone Emulator and Opera Mobile Emulator. </p>
  
  <pre><code>_Layout.cshtml   [loaded from desktop based browser]
  _Layout.Android.cshtml [never loaded]
  _Layout.iPhone.cshtml  [never loaded]
  _Layout.Mobile.cshtml  [loaded from mobile based any browser including iphone, opera] 
  </code></pre>
  
  <p>What I assume that something wrong is I get only two files when I downloaded from 51Degrees.mobi by using NuGet package.</p>
  
  <p><code>FiftyOne.Foundation.dll</code><br>
  <code>51Degrees.mobi.config</code></p>
  
  <p>Even though I think I should get <code>App_Data/Devices.dat</code> but I still only get these two files from 51Degrees.mobi.</p>
  
  <p>Could anyone please give suggestion to me how I could call specific view for IPhone and Android?
  Every suggestion will be appreciated.</p>