I am saving uploadPaths into the ViewState by doing this
VB Code:
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click i = 1 'declared as global variable uploadCount = 1 'declared as global variable ViewState("UploadPath" & i) = attachmentFile.PostedFile.FileName 'rest of code uploadCount = +1 i += 1 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
It isn't returning any values....Why is this...Am I missing something???VB Code:
For i = 1 To uploadCount Response.Write("UploadPath: " & ViewState("UploadPath" & i) & "<br>") Next




Reply With Quote