title: Detecting IE11 with C#
body: <p>Before loading a webpage I am detecting browser and version to determine compatibility.</p>
  
  <p>So if the browser is less than IE7 I display an incompatible message.</p>
  
  <p>Testing the webpage in IE11 my webpage is displaying the incompatible message.</p>
  
  <p>I'm currently getting the browser name from:</p>
  
  <pre><code>var browser = Request.Browser.Browser;
  </code></pre>
  
  <p>and the version from</p>
  
  <pre><code>var version = Request.Browser.Version;
  </code></pre>
  
  <p>I then check that the browser is IE and the version >= 7.</p>
  
  <p>I believe that the user agent has changed for IE11. 
  So what is the best way to detect if the browser is >= IE7 using C#.</p>
  
  <p>EDIT:</p>
  
  <p>Request.Browser.Browser returns the browser name, e.g. IE. Request.Browser.Version returns the version number. I add these to a BrowserVersion object I have and compare these values to an array of supported browser versions that I have also. i.e.</p>
  
  <pre><code>private static List&lt;BrowserVersion&gt; m_supportedBrowsers = new List&lt;BrowserVersion&gt;()
          {
              new BrowserVersion("IE", 7),
              new BrowserVersion("Firefox", 3),
              new BrowserVersion("AppleMAC-Safari", 5),
              new BrowserVersion("Safari", 5)
          };
  </code></pre>
  
  <p>where BrowserVersion is just an object that has 2 string properties (name and version).</p>