Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I develop socialportal. I want to do some thing like how many times a profile of a user is viewed like on this website, the views of a question.
Posted
Updated 22-Apr-11 5:15am
v2

Here's one way to do this:

http://madskristensen.net/post/Track-your-visitors-using-an-HttpModule.aspx[^]

At a very elementary level you could write a parser for your HTTP server logs.

A slightly more involved approach would be to do this in the server side code. There may be existing libraries that help with this. But eventually it comes down to saving the IP address and/or logged-in user profile of the visitor (if you need that info) along with a date-time stamp.
 
Share this answer
 
v2
Comments
Sandeep Mewara 22-Apr-11 12:17pm    
My 5!
One way would be to set up a process that increments a counter each time the page is opened. You know who the user is so it should be simple to add a column to the user table and update that each time. The rest I leave to you to figure out; this is a very trivial process.
 
Share this answer
 
v2
You could put something in your master page - I have something in mine that determines the last edited date of the aspx page that's being displayed. It would be a simple task to add a little more code to store this info somewhere (like in a database). My hosting company doesn't allow Httpmodules, so this is pretty much my only option.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900