Monday, December 17, 2007

How to store different user information when different users open ASP program

How to store different user information when different users open ASP program

S T E P - 1

- Now, We can create an ASP program to save the user login time.

- We will use the Session to save it.

- First, we create 2 ASP files. The first file is used to get the login time:

<%

Session("Login") = Now 'Get the web server time

Response.Redirect("session02.asp") 'Go to session02.asp

%>

S T E P - 2

- The second file is used to show the value of Session.

<%

Response.Write("This is you login time : " & Session("Login"))

%>

So, we know the value of Session which can be used in the different pages, but not shared to everybody.

S T E P - 3

- The value of Session will be erased when the user closes the browser.

No comments: