Here is one that is stumping me.
I am designing a simply ASP.NET(VB.NET) web app. The user will build an upload que. This is done by taking the information about the file and storing it in a table on a SQL Server 2000 DB. (This is also done b/c Iwill need this information later)
The user will build the que and then click “Upload” This will retrieve all the information from the SQL Server and use it to upload the files as one batch. However, I can not get it to work. Here is some code:Dim savePath As String = “D:\bstone_files\”
Dim uploadedFile As HtmlInputFile
…Get some info from database…
Try
Do While rd.Read()
uploadedFile.Value = rd(“originalLocation”)
Dim postedFile = uploadedFile.PostedFile
fileName = rd(“documentFile”)
postedFile.SaveAs(savePath & fileName)
Loop
Catch ex As Exception
Response.Write(“Upload Failed!”)
End Try
The error I get: Object reference not set to an instance of an object.
I do not want the user tohave to use multiple inputFile controls.
Is there any way to do this without using the HtmlInputFile control at the time of upload?
Thanks for your help!