title: Response.Redirect error on mobile devices
body: <p>On my main login screen, i am checking to see if the browser is a mobile browser.  If the browser is a mobile browser i redirect the user to the mobile website login screen.  This works fine on my Android device but not on my Iphone.  I went and tried putting in Response.End() after my redirects but that caused my Android device to start getting the error message.  The message i am getting on both devices is that there are to many server redirects.  Any Hints?</p>
  
  <p>Edit: </p>
  
  <pre><code>if (Request.Headers["User-Agent"] != null &amp;&amp; (Request.Browser["IsMobileDevice"] == "true" 
              || Request.UserAgent.ToUpper().Contains("MIDP") || Request.UserAgent.ToUpper().Contains("CLDC") 
              || Request.UserAgent.ToLower().Contains("iphone") || Request.UserAgent.ToLower().Contains("avant") 
              || Request.UserAgent.ToLower().Contains("nokia") || Request.UserAgent.ToLower().Contains("pda") 
              || Request.UserAgent.ToLower().Contains("moto") || Request.UserAgent.ToLower().Contains("windows ce") 
              || Request.UserAgent.ToLower().Contains("hand") || Request.UserAgent.ToLower().Contains("mobi") 
              || Request.UserAgent.ToUpper().Contains("HTC") || Request.UserAgent.ToLower().Contains("sony") 
              || Request.UserAgent.ToLower().Contains("panasonic") || Request.UserAgent.ToLower().Contains("blackberry") 
              || Request.UserAgent.ToLower().Contains("240x320") || Request.UserAgent.ToLower().Contains("voda"))
              || Request.UserAgent.ToLower().Contains("android") || Request.UserAgent.ToLower().Contains("ipad")) 
          {
              Response.Redirect("~/Mobile/Login.aspx");
          }
  </code></pre>