I'm using the file upload to let the user upload a single file. Here's the code I'm using to then upload to the DB. How do I reverse this process and dowload the image into the control for it to display on a different page?
Here's my code for the upload - which I think works but can't confirm until I can see the download since all I see in the DB is "binary data"
'update DB with new Image
If FileUpload1.HasFile AndAlso FileUpload1.PostedFile.ContentLength > 0 Then
'Read the file in to a byte Array.
Dim filebyte As Byte() = FileUpload1.FileBytes
Dim fileBinary As New System.Data.Linq.Binary(filebyte)
Dim c3 = (From c In dc.ProductImages _
Where c.userID = userGuid _
c3.productImage = fileBinary
Catch ex As Exception
Here's my attempt at the retrieval, which isn't working:
Dim currentImage = F
View Complete Post