ASP.NET how to check if client is Mac
Seems like there are several wa开发者_如何学Cys to do this. I've found to use HttpContext.Current.Request.UserAgent
, Request.ServerVariables("HTTP_USER_AGENT")
, Request.Browser.Platform
. Not sure which one is a more correct way to detect the OS version. Also, how do I get a list of the OS version string that client browser may send to web server. With that string, so I can filter it out in the code.
you can use Request.UserAgent
.
User agent list
精彩评论