I am capturing the client path for upload files and storing them in a Hashtable from within the btn_UploadFile event.
VB Code:
'i is just a counter 'Add upload path to hashtable strUploadPath.Add(attachmentFile.PostedFile.FileName.ToString, i)
In the btn_Submit click event I am trying to iterate through the Hashtable and grab the key/value pairs, but for some reason it isn't returning anything?? and I don't know why???
VB Code:
For each de in strUploadPath Response.Write("Key: " & de.Key) Response.Write("<BR>") Response.Write("Value: " & de.Value) Next
I don't know why it won't retrieve the values??? I have declared both variables in the General Declarations section, so they should be avaliable to any procedure.
Dim strUploadPath As New Hashtable
Dim de As DictionaryEntry
Does anyone know why I wouldn't be able to retrieve these values from the Hashtable???
***EDIT***
If I have it all in the same sub it works, but I need it separated into 2 different subs.




Reply With Quote