Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Force IE usage

  Asked By: Nichole    Date: Nov 12    Category: Asp.net    Views: 685
  

I doubt the possibility of this, but figured I'd ask anyway. Is it
possible to somehow automatically open an ASP.NET site with IE if itw as
determined that the user is using something other than IE? I figure
would need to use some ActiveX applet which wouldn't work in browsers
like Netscape, etc.

Is it possible to use JavaScript or an applet?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Laura Rodriguez     Answered On: Nov 12

You can block the access to your site  by using the BrowserCapabilities to detect which browser the user  is running
I made this snippet in c# to detect user browser a while ago....


HttpBrowserCapabilities bc = Request.Browser;
switch (bc.Browser.ToLower())
{
case "ie": { return ((bc.AOL)? "AOL": "IE" + bc.MajorVersion.ToString());}
case "netscape": { return "NS" + bc.MajorVersion.ToString();}
case "aol": { return "AOL";}
case "opera": { return "OPERA";}
case "mozilla": { return "MOZILLA";}
default: return "NOINFO";
}

 
Didn't find what you were looking for? Find more on Force IE usage Or get search suggestion and latest updates.




Tagged: