In asp.net, using this construct, how might I detect the new Microsoft \"Edge\" browser?
Dim wrkBrowser As String = \"\"
Dim wrkBrowserType As String
You need to check the UserAgent like this:
if (Regex.IsMatch(HttpContext.Request.UserAgent, @"Edge\/\d+"))
{
wrkBrowser = "Edge"
}
If you're checking for multiple browsers be careful of the order you check as many browsers like to mention other browsers in their UserAgent string.
This is Edge's current User Agent String:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393