算数使用vb.net的网站点击数 [英] count the no. of hits on website using vb.net
本文介绍了算数使用vb.net的网站点击数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何算出编号.使用vb.net
how we can count the no. of hits on website using vb.net
推荐答案
网站点击数的一种流行的实现方法是使用" Google Analytics ".
http://www.google.com/analytics/
http://en.wikipedia.org/wiki/Google_Analytics
编辑(已纠正拼写错误)-但是,当您可以使用简单的Javascript(Google Analytics(分析))实现此功能时,我不希望使用VB.Net(代码隐藏)逻辑.
One of the popular way to do this is using "Google Analytics".
http://www.google.com/analytics/
http://en.wikipedia.org/wiki/Google_Analytics
Edit (Spelling Corrected) - However I would not prefer VB.Net(code-behind) logic for this when you can achieve this using simple Javascript(Google Analytics).
具有全数字图形文件支持的快速ASP.NET命中计数器 [ ^ ]
在Global.asax中执行以下代码
Do following code in Global.asax
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'This variable Hits will store the # of visitors
Application("hit") = 0
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
'Lock the Application for concurrency issues
Application.Lock()
'Increment the counter
Application("hit") = Application("hit") + 1
'Unlock the Application
Application.UnLock()
End Sub
在任何页面上,您都可以使用application("Hits")
获得应用程序匹配
会话启动事件,当用户访问该网站且访问者人数增加1时被调用.
on any page you can get application hits using application("Hits")
session starts event called when user visit the site and couter gets increased by 1
这篇关于算数使用vb.net的网站点击数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文