Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.40/5 (3 votes)
See more:
i'm new to ASP.Net...kindly explain me

how to store the user information (pages he visited, task performed in a page)
like gmail search history and latest reputation events in code project.kindly expalin me with codings...
Posted
Comments
Sergey Alexandrovich Kryukov 25-Mar-14 13:32pm    
Any particular concerns? Do you have authentication already?
—SA
priya dharshan 25-Mar-14 13:43pm    
not yet done authentication
Sergey Alexandrovich Kryukov 25-Mar-14 14:26pm    
Then do it, and the use it... :-)
—SA

You can't track everything a person does in their webbrowser on other sitesfrom your ASP.NET application. Your code is itself, a web server that a browser hits. You can track everything a person does on your own site, but not others.
 
Share this answer
 
In my next article MVC Basic Site: Step 4 – jqGrid Integration in MVC 4.0 using AJAX, JSON, jQuery, LINQ, and Serialization[^] I have provided an ASP.NET MVC application skeleton that manage the Visitors logs. Now only the user name,login date, the logout date and if was timeout or not are stored but could be extended to store as many info as you wanted.

1.First you have to extend the existing tables and at least the table VisitorLogs;

2. Then you should add your inspection code into the next method from BaseController class: protected override void ExecuteCore(). This method is executed in response to each user action request (from the web pages) just before the current action to be executed, so by using the next code:
C#
System.Web.Routing.RouteValueDictionary routeValues = this.Url.RequestContext.Data.Value;
string controller = routeValues["controller"];
string action = routeValues["action"];

you will know the current controller and action that the user want to execute and you could stores this info into the VisitorLogs table.

3.To stores the info from the 2nd step your should extend the class VisitorLog with a new method similar with OnUserLogin() .
 
Share this answer
 
v2
In ASP.NET you can do Page Tracking something like this[^].

Alternatively you can visit this page[^] to make some searches.

Hope it helps.
 
Share this answer
 

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