Browser detection

前端 未结 6 1457
春和景丽
春和景丽 2020-11-30 00:35

I need to separate IE and FF browsers from others

it\'s a pseudo-code :

If (CurrentBrowser == IE(6+) or FF(2+) )
{
...
}
else 
{
...
}
6条回答
  •  情书的邮戳
    2020-11-30 01:09

    Try the below code

    HttpRequest req = System.Web.HttpContext.Current.Request
    string browserName = req.Browser.Browser;
    

提交回复
热议问题