How to Detect new Microsoft browser “Edge” in asp.net

后端 未结 5 1222
不知归路
不知归路 2020-12-18 11:14

In asp.net, using this construct, how might I detect the new Microsoft \"Edge\" browser?

    Dim wrkBrowser As String = \"\"
    Dim wrkBrowserType As String         


        
5条回答
  •  半阙折子戏
    2020-12-18 12:02

    I know the answer is a little late but I searched all over the place and never found this and had to write it myself. The following code will allow the Request.Browser variables to return Edge and Edge Version instead of Chrome.

    Adding the following snippet to a .browser file such as platform.browser in the App_Browsers folder will cause it to return Edge and the version.

    
      
        
      
      
        
        
        
        
      
    
    

提交回复
热议问题