In asp.net, using this construct, how might I detect the new Microsoft "Edge" browser?
Dim wrkBrowser As String = ""
Dim wrkBrowserType As String = HttpContext.Current.Request.Browser.Type
If InStr(wrkBrowserType, "Chrome") <> 0 Then
wrkBrowser = "Chrome"
If InStr(wrkBrowserType, "MSIE") <> 0 Then
wrkBrowser = "IE"
If InStr(wrkBrowserType, "FireFox") <> 0 Then
wrkBrowser = "FF"
I am not an adept in anything .NET, but reading your code, it seems to me that the value returned by
Is a user agent.
You can find information about the user-agent for Edge at this page.
User-agent for edge:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
Note that the value can change based on mobile, xbox, etc.
So in your case, try doing a check on "Edge"