Пример #1
0
        private bool DetectForMobile(HttpRequest request)
        {
            //http://code.google.com/p/mobileesp/source/browse/
            MDetectControl detect = new MDetectControl();

            detect.FireEvents(request);

            if (detect.DetectWindowsPhone7() == true ||
                detect.DetectWindowsMobile() == true ||
                detect.DetectIphoneOrIpod() == true ||
                detect.DetectIphone() == true ||
                detect.DetectAndroidTablet() == true ||
                detect.DetectAndroidPhone() == true)
            {
                return(true);
            }

            return(false);
        }
        void MobileDetectControl_OnDetectWebkit(object page, MDetectControl.MDetectArgs args)
        {
            //Write the Type value from the argument to the web page. 
            Response.Write("<b>This browser is " + args.Type + "</b>");

        }