Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to track the user activity after he logged in.
Like which record he has added,Update how may record or only the list of the field he made changes and update.


And than mail this list to administrator that so an so user has made change in the database and the field that he has change and page he has visited



Please provide some references or code .
Or some step to achieve above mention thing.
Thanks In Advance
Anil
Posted
Comments
ZurdoDev 11-Oct-12 7:54am    
The obvious way to do it is to write the code. Every time the user does something make an entry in the database. Or, you can use something like WebTrends analytics or Google's assuming they track what you want.
I.explore.code 11-Oct-12 14:00pm    
You can do as ryanb31 has suggested, but I reckon that it will add another overhead of updating database more than what should be.

In case you just want to track the pages a user visits along with query strings etc, you can use a http handler. Refer to this link for a short introduction - http://support.microsoft.com/kb/308001[^]. There is a lot more information on the net pertaining to http handlers, have a look at them. If you want to track every particular mouse click, it is going to be really hard on the database and the server. So, I would recommend just logging the pages and the query strings.

If you insist on storing every activity in a page, you may have provide a utility class with a method, that gets called from every method call to log information you need. But this definitely is not a good idea!

Hope this helps!
 
Share this answer
 
If you want to track all the changes users make to a database, then the easiest way would be to add a transaction log to the database. You can even get away with a single table that tracks the table name, the username, the commandtype, and a summary of the change. If you really want constant notification you can do that from the database as well from an insert/update trigger on this new transaction table.
 
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