CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Clear Session Variables

Print topic Send  topic

Author Message
JoeyBoy
Posted: 11/19/2004, 9:47 AM

I Created Session Variables when a user logs on, and in each page I have a "Logout" link, this link works, it delete the 3 Session varibles that CCS creates, but not my "Hand made variables", what I have to do.

As you see Im new in asp...
dataobjx


Posts: 181
Posted: 11/20/2004, 12:17 PM

One way to manage killing session variables is to have a completely separate page called "logout.asp"...

Send all log-out links to that page rather than calling the CCS Logout function located in common.asp.

Modifying common.asp can cause regeneration errors. So this method is not only easier to manage, it's probably a better option. We think so.

Create logout.asp and in the before page show event place the following code;

Session("UserID") = Empty
Session("UserLogin") = Empty
Session("GroupID") = Empty

'Next add you custom session variables you created in your application.

Session("x") = Empty
Session("y") = Empty
Session("z") = Empty

'Finally, redirect back to unlogged default.asp page

Response.Redirect "default.asp"

_________________
www.DataObjx.net
www.mydigitalapps.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.