Determine the view count like in youtube using Asp.net MVC
Do anyone knows how to do the View count for a specific page.
Like in youtube, when you click a video, the number of view count will increment. But if you already viewed the video before it will not increment.
I would like to know how to do this in asp.net mvc. I already have an idea but im not sure if right.
开发者_如何学GoI need an expert advice... thanks
You would probably need to store the total view count in a db and as serbrech said use a cookie to determine if the user has been to the page before and if not increment the view count.
I would simply store a permanent cookie on the user... Though, that would be reset when the user deletes it.
精彩评论