Click here to Skip to main content
13,765,976 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Friends,

Please suggest me to recognize the browser microsoft edge with any c# call.

I am tried with below.

System.Web.HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;


What I have tried:

System.Web.HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;
Posted 7-Dec-17 6:18am
Updated 7-Dec-17 9:39am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This is how you do it, How to: Detect Browser Types and Browser Capabilities in ASP.NET Web Forms[^], although my version of Edge reports Request.Browser.Browser as Chrome so it does not work 100% as expected.

Just a note, it is bad practice to check for browser in c#. I'd suggest seeing if you can do what you need done a different way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web05-2016 | 2.8.181114.1 | Last Updated 7 Dec 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100