标签:
public static bool IsMobile() { var context = HttpContext.Current; if (context != null) { var request = context.Request; if (request.Browser.IsMobileDevice) { return true; } if (!string.IsNullOrEmpty(request.UserAgent) && RegexMobile.IsMatch(request.UserAgent)) { return true; } } return false; }
标签:
原文地址:http://www.cnblogs.com/qigege/p/5162175.html