I had a similar problem with older .Net versions - I found that certain 'phablet' device were slipping through so I read into the UserAgent string
httpContext.Request.UserAgent != null
&& (httpContext.Request.UserAgent.ToLowerInvariant().Contains("mobi")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("ereader")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("smartphone")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("iphone")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("ipad")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("ios")
|| httpContext.Request.UserAgent.ToLowerInvariant().Contains("android")
of course this is if you need server-side device detection, if doing this client-side you would want to look in the navigator.userAgent
object...