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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Losing Array Values

Status
Not open for further replies.

lagyossarian22

Programmer
Jul 18, 2012
5
US
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.

Code:
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 Repsonse.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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top