If you want to know the type of the client browser, you will probably check the Request.Browser.Type property. However, you will notice that IE8 is reported as IE7. There is a simple work around for this. If you check the Request.UserAgent property, you will see that IE8 browsers insert word “Trident”. So this code solves the problem:
string browserType = Request.Browser.Type;
// IE8 is not reported in browser type but it can be detected
// by word "Trident" in the user agent
if (Request.UserAgent.ToUpper().Contains("TRIDENT"))
browserType = browserType.Replace("IE7", "IE8");