Using Sessions we can maintain user specific data on the server.
Since HTTP is a stateless protocol so Session can be used to carry values specific to a particular user from one webpage to another.
Lets say person1 and person2 and are accessing a website. Person1 adds one item to his cart and person2 adds three items to his cart. When Person1 moves to the next page to process the payment, Person1 should see only the items selected by him. One way of doing this is by using a Session object and storing the items in the Session object.
session is a server variable. it works like the ordinary variable but it is stored on the server
ASP.NET automatically creates a session for each unique browser connection to your application. You can access the session through the Session[] collection in any System.Web.UI.Page object.
there are 6 objects. 1. server 2. session 3. application 4. ObjectContext 5. Response 6. Request
george
Ajax, I believe uses JavaScript + ASP.
B'cos this is the extension of a page in .net
You can use ajax to prevent refresh the page
<?php // start session session_start(); // Assign value to session $user = $_SESSION['variable_name']; // variable_name = value to store in session // To reset session variable use below method unset($user); // If you want to destroy all session variables use below method session_destroy(); // destroys all session variables ?>
Information about ASPNET can be found on the ASPNET website. Anything one needs to know about using this application framework for web development purposes can be found there.
The following code gets the current session then sets the value of the session variable 'sessionName' to 'helloworld'. $session =& JFactory::getSession(); $session->set( 'sessionName', 'helloworld' ); The session variable can be retrieved later in a similar way. $session =& JFactory::getSession(); echo 'Session variable sessionName has value: ' . $session->get( 'sessionName', 'empty' );
At the end of the session, we all exited out of the lunch room and went out to recess.
6