Hi - I have a datatable, held in a session variable - I want to delete
all items in a particular category, but my code doesn't seem to delete
them - although the delete method is run:
Function delCat(ByVal Cat as integer)
objDT = Session("Cart")
Dim i as Integer
Dim test as Integer
For i = objDT.Rows.Count-1 to 0 step -1
test = CType(objDT.Rows(i)("Category"), Integer)
If test = Cat then
objDT.Rows(i).Delete()
End If
Next
Session("Cart") = objDT
End Function
Can anyone please help show me where I'm going wrong?
Thanks, Mark
*** Sent via Developersdex http://www.developersdex.com ***