Prioregroup.com
homesoftwaredownloadstoreforumscustomerreseller

Decription
A simple way to use the ASP Session variabiles without Session Object and without Cookies.

License
This code is written in ASP/JavaScript and distributed under the GNU General Public License which means that its source code is freely-distributed and available to the general public.

Request Feature
SoftForAll


Download    Donate

Installation instructions

1) Copy the file sessions.mdb in a folder with the write permissions enables (Tipically obtaineable with the Permissions of the Everyone to Full Control), and the read permission from IIS disabled.
2) Includes in the pages where are needed the session's variables the file sessions.asp, before of any other include.
3) Includes into the HEAD of the pages the file session.js, before any other scripts.
4) Includes into the HEAD a META tag named "sessionid" with the CurrendSessionID variable value.


example:

<!-- #include file="sessions.asp" -->
<html>
<head>
<meta name="sessionid" content="<%=CurrentSessionID%>">
<script language="javascript" src="sessions.js"></script>
</head>
<body>
</body>
</html>

Usage

First, set the database path : CSession.DatabasePath "relative-path" (default /mdb-database)
A HREF Links : <a href="javascript:gotoPage('mypage.asp')">Link</a>
Form post/get : <form action="mypage.asp" onsubmit="doSubmitWithSessionID(this)">
ASP Redirection : CSession.Redirect "mypage.asp"
Set a value : CSession.SetSession "variable-name", "variable-value"
Get a value : ret = CSession.GetSession "variable-name"
Remove value : CSession.Remove "variable-name"
Purge values : CSession.RemoveOld()
JavaScript Redirect : gotoPage("mypage.asp")
JavaScript open : windows.open("mypage.asp?SessionID=" + GetSessionID())

note (1): if in one own javascript you need to know and use the value of the session ID, you can use the javascript's function GetSessionID(). If you need to redirect the output into a javascript, you have to remember to pass the parameter SessionID to the page.

note (2): are allowed the personalized parameters for all calls.


Home Hardware Software Download Store Forums Customer Refund Policy Reseller Us
©2004/2010 (CSI) Centro Studi Informatica di Danilo Priore. All rights reserved.