Hey guys.
Got a little problem. Can't seem to return a Byte Array value with a function? Maybe I'm not properly declaring that the function is Byte Array type?
Here's what I've got
Public Function ImageData(ByVal ControlId As FileUpload) As Byte()
'Make sure a file has been successfully uploaded
If ControlId.PostedFile Is Nothing OrElse String.IsNullOrEmpty(ControlId.PostedFile.FileName) OrElse ControlId.PostedFile.InputStream Is Nothing Then
'ShowErrorMessage("No file was uploaded. Please make sure that you've selected a file to upload.")
Exit Function
End If
'Make sure we are dealing with a JPG or GIF file
Dim extension As String = Path.GetExtension(ControlId.PostedFile.FileName).ToLower()
Dim MIMEType As String = Nothing
'Load FileUpload's InputStre ...
Go to the complete details ...