Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Array Losing Values

$
0
0

I have a script that is conditionally assigning a value of one to a cell of a multi-dimensional array as it loops through it. 

Count = 0
      ClientData = Session ("ClientData")
      for each item in ClientData(ExpertReportList)
        if Count = CLng ( Request("DeleteItem") ) then
          item(EXPERT_REPORT_DELETE) = 1
        end if
        Response.Write(Cstr(item(EXPERT_REPORT_DELETE)))        
        Count = Count + 1
      next
      for each item in ClientData(ExpertReportList)
        Response.Write(Cstr(item(EXPERT_REPORT_DELETE)))
      next
      Session ("ClientData") = ClientData

The problem is that one the first pass through, the Response.Write is showing the correct values; but, on the second pass through, all of the values are back to the original values before they passed through the loop.

Any ideas what is causing this?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>