View comments | RSS feed

Getting a list of session variables

Use the StructKeyList function to get a list of session variables, as follows:

<cflock timeout=20 scope="Session" type="Readonly">
   <cfoutput> #StructKeyList(Session)# </cfoutput>
</cflock>

Caution: Always put code that accesses session variables inside cflock tags.


ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting

Version 7

Comments


Ashish-Saxena said on Aug 5, 2007 at 9:07 AM :
Likewise “Getting a list of session variables” we can also do: “Getting an array of session variables”.
<cflock timeout=20 scope="Session" type="Readonly">
<cfdump var="#StructKeyArray(Session)#" >
</cflock>

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00001160.htm