如何计算像CodeProject这样的文章的观看次数 [英] How to count the view of article like codeproject
本文介绍了如何计算像CodeProject这样的文章的观看次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
我在creata网站上,我想显示商品视图
我的意思是多少次项目在线查看
如何做到这一点,请给我个主意
hi
i m creata website and i want to show the item view
i mean how many times item view online
how to do this give me idea please
推荐答案
那只是在每页DB中保留一个整数字段.
然后将计数器放在Globle.Asax文件中(希望您使用的是ASP.Net,就像您刚才所说的"codeproject"标记一样,它也使用ASP.Net).
内部方法
Application_BeginRequest()
如果要永久存储页面,请获取请求页面用户的名称并在DB中更新计数器.否则,您可以使用会话进行维护.
有关更多信息,请此处 a> [
That''s just keeping a integer field in DB per page.
Then put the counter in Globle.Asax file(Hope you''re using ASP.Net as you just stated ''codeproject'' tag, and it uses ASP.Net too)
Inside method
Application_BeginRequest()
Fetch name of page user requesting for and update counter in DB if you want to store it permanently. otherwise you can use session to maintain.
for more information HERE[^] is a mega link for you.
您需要为每篇文章维护单独的计数.
请参考
使用ASP.NET和JScript .NET的页面点击计数器 [
You need to maintain the separate count for every article.
Refer this
Page Hit Counter using ASP.NET and JScript .NET[^]
这篇关于如何计算像CodeProject这样的文章的观看次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文