如何使用asp.net MVC4检查手机访问者的数量和网站的桌面访问者数量 [英] how to check number of mobile phone visitors and number of desktop visitors to website using asp.net MVC4

查看:70
本文介绍了如何使用asp.net MVC4检查手机访问者的数量和网站的桌面访问者数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

i我正在开发一个asp.net MVC4网络应用程序想知道有多少(数量)移动用户访问过我的网络应用程序以及有多少(计数)桌面/笔记本电脑用户访问过网络应用程序。



在此先感谢



Pradeep。

解决方案

您必须检测设备,然后根据该结果需要将详细信息记录到数据库表中作为计数或任何事情。



  if (Request.Browser.IsMobileDevice)
{
// 移动用户时数据库日志的代码
}
else {
// 桌面用户的DB日志代码
}







请检查一下了解更多信息。



如何检测请求是否来自我的asp.net MVC中的移动浏览器


Hi All
i am developing one asp.net MVC4 web application want to know how many(count) mobile users visited my web application and how many(Count) desktop/Laptop users visited web application.

Thanks in Advance

Pradeep.

解决方案

You have to detect the device and then according to that result where need to log that details into db table as a count or what ever.

if (Request.Browser.IsMobileDevice)
            {
                //code for DB log when mobile users
            }
            else {
                //code for DB log when desk top users
            }




Please check this for more info.

How can i detect if the request is coming from a mobile browser in my asp.net MVC


这篇关于如何使用asp.net MVC4检查手机访问者的数量和网站的桌面访问者数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆