I am saving uploadPaths into the ViewState by doing this
VB Code:
  1. Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click
  2.     i = 1 'declared as global variable
  3.     uploadCount = 1 'declared as global variable
  4.  
  5.     ViewState("UploadPath" & i) = attachmentFile.PostedFile.FileName
  6.  
  7.     'rest of code
  8.  
  9.     uploadCount = +1
  10.     i += 1
  11. End Sub

When I view the data in ViewState I can see the first uploaded value, but it doesn't save any additional uploads into ViewState.

And when I try to read the values from ViewState
VB Code:
  1. For i = 1 To uploadCount
  2.     Response.Write("UploadPath: " & ViewState("UploadPath" & i) & "<br>")
  3. Next
It isn't returning any values....Why is this...Am I missing something???