C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




previous visit date


Posted Date: 30 Aug 2008      Total Responses: 3

Posted By: pavani       Member Level: Bronze     Points: 1


Hi

I need to display the previous visit date for the particular site like hot mail
can anybody tell how can i do?




Responses

Author: Karthikeyan S    30 Aug 2008Member Level: GoldRating:     Points: 5
Hi,

First in database have a column to store the lastvisiteddate column in user details table.

Then in the login page of your website in the page after successfull login, in the page load event and if (IsPostBack) is false then update the database field with current date using query (
UPDATE USER_DETAIL SET LastLoggedInDate = getdate() where ID = LOGGED_IN_ID;

There by loggedin userdetail, 'LastLoggedInDateTime' or 'PreviousVisitedDate' is get updated once user logged in your page successfully.
)

Note: In my earlier post i told more details about IsPostBack.



Author: pavani    30 Aug 2008Member Level: BronzeRating:     Points: 0
thank u


Author: satyam kumar    31 Aug 2008Member Level: SilverRating:     Points: 5
Hi,

I am sure the User table would have date time column related to Previous visit date.

Now what you do in the time of login, retrieve the Previous Visit date and update the column respected to specific user.

Example:

select PreviousVisitDate from user where userID = 'Given UserID';

Update PreviousVisitDate = getdate() where userID = 'Given UserID';

Hope it will help you.

If you have concern please let me know.

Thanks:
Satyam Kumar



Post Reply
You must Sign In to post a response.
Next : Program Setp Quries ....
Previous : Crystal Report
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

teleconferencing service

Contact Us    Privacy Policy    Terms Of Use