Apache::ASP Powered by ModPerl & Apache Powered by Apache::ASP
Demo ASP: source.asp 2024-07-17

Source of file session.asp:

    my $form = $Request->Form();

# process form here
if($form->{increment}) {
} elsif($form->{timeout}) {
} elsif($form->{abandon}) {

my @rows = (
<!--#include file=header.inc-->

This file demonstrates the use of the $Session object, as well
as one implementantion of cookieless sessions involving the 
use of the SessionQuery setting, and the <nobr>$Server->URL($url, \%params)</nobr>
method to add session ids to the form query string.
To demo the cookieless sessions, just turn off your cookies
and use this form.
<table border=1>
<tr><td colspan=2 align=center><b>Session Object Demonstration</b></td></tr>
<form action=<%=$Server->URL($demo->{file})%> method=POST>
	<td colspan=2 align=center>
	<input type=submit name=increment value="Increment Count">
	<input type=submit name=timeout   value="Timeout 15 Seconds">
	<input type=submit name=abandon   value="Abandon">
<% for (@rows){ %>
		<td><%=eval($_) || $@%></td>
<% } %>
The value for $Session->{Count} gets reset to 10 on every session start
in the global.asa file.

<!--#include file=footer.inc-->

view this file's source