Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get a list of current session variables ? 2

Status
Not open for further replies.

Webwzrd

Programmer
Apr 23, 2002
40
US

I hope someone can help me with this.

I need to get a list of current session variables and their values for each page. I need it for bug tracking. Every thing I have tried has failed. Any ideas would be greatly appreciated!

Thanks!
Bob
 

PS: I need the code to execute from the Global.asax.vb page
 
Something like this
Code:
foreach(string key in Session.Items.AllKeys){
    Trace.Write(Session[key].ToString());
}

 
This doesn't work from the global class, but if you simply add this to your page directive:

Trace=True

so:

<%@ Page Trace=True... %>

It will output all sorts of useful information including all your session variables and their values. Add this to any page you want.

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top