Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7958723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:27:55+00:00 2026-06-04T04:27:55+00:00

I am trying to do a If browser is IE and is less than

  • 0

I am trying to do a “If browser is IE and is less than version 9” in ASP.Net C# codebehind.

However, In chrome, the following line:

if (Request.Browser.Browser == "IE" && Request.Browser.MajorVersion < 9)

Outputs as “IE” & 5 respectively. Despite using Chrome v18.

What is the correct usage for getting the users browser? Or is this just my version of Chrome playing up? It’s probably really simple, but I’m sure this code worked previously

The user agent is registering as:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:27:56+00:00Added an answer on June 4, 2026 at 4:27 am

    I have v19 and i do see the correct value. Are you sure you don’t have any emulator (user agent emulator) or something like this…

    chrome 19

    Browser Capabilities
    Type = Chrome19
    Name = Chrome
    Version = 19.0
    Major Version = 19
    Minor Version = 0
    Platform = WinNT
    Is Beta = False
    Is Crawler = False
    Is AOL = False
    Is Win16 = False
    Is Win32 = True
    Supports Frames = True
    Supports Tables = True
    Supports Cookies = True
    Supports VBScript = False
    Supports JavaScript = 3.0
    Supports Java Applets = True
    Supports ActiveX Controls = False
    Supports JavaScript Version = 1.7
    

    ie 8

    Browser Capabilities
    Type = IE7
    Name = IE
    Version = 7.0
    Major Version = 7
    Minor Version = 0
    Platform = WinNT
    Is Beta = False
    Is Crawler = False
    Is AOL = False
    Is Win16 = False
    Is Win32 = True
    Supports Frames = True
    Supports Tables = True
    Supports Cookies = True
    Supports VBScript = True
    Supports JavaScript = 3.0
    Supports Java Applets = True
    Supports ActiveX Controls = True
    Supports JavaScript Version = 1.5
    

    and this is the code for this output:

       string s = "Browser Capabilities\n"
                + "Type = " + browser.Type + "\n"
                + "Name = " + browser.Browser + "\n"
                + "Version = " + browser.Version + "\n"
                + "Major Version = " + browser.MajorVersion + "\n"
                + "Minor Version = " + browser.MinorVersion + "\n"
                + "Platform = " + browser.Platform + "\n"
                + "Is Beta = " + browser.Beta + "\n"
                + "Is Crawler = " + browser.Crawler + "\n"
                + "Is AOL = " + browser.AOL + "\n"
                + "Is Win16 = " + browser.Win16 + "\n"
                + "Is Win32 = " + browser.Win32 + "\n"
                + "Supports Frames = " + browser.Frames + "\n"
                + "Supports Tables = " + browser.Tables + "\n"
                + "Supports Cookies = " + browser.Cookies + "\n"
                + "Supports VBScript = " + browser.VBScript + "\n"
                + "Supports JavaScript = " +
                    browser.EcmaScriptVersion.ToString() + "\n"
                + "Supports Java Applets = " + browser.JavaApplets + "\n"
                + "Supports ActiveX Controls = " + browser.ActiveXControls
                      + "\n"
                + "Supports JavaScript Version = " +
                    browser["JavaScriptVersion"] + "\n";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to stop the browser from following certain links, rather I want to
I'm trying to extract not just the browser and its version number but also
I am trying to use a headless browser in .Net and I need it
I'm trying to find a less haphazard way than a write-and-test way to write
I'm trying to verify the behaviour of my ASP.Net MVC app when an unexpected
I'm trying to display the less-than sign using MathJax to render MathML input... currently
I'm trying to use the ie7-js library to make my browsers less than ie9
I've been browsing through all of the CSS related cross-browser questions trying to troubleshoot
I am trying to add a browser using GtkMozEmbed into a gui I am
I'm trying to detect the browser's current size (width and height). I know it's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.