Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Nichole Knight   on Nov 12 In Asp.net Category.

  
Question Answered By: Laura Rodriguez   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";
}

Share: 

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


Tagged: