hiiiiiiiiiiiiiiii

I'm going to store a selected image from fileupload
and save the image in a array of byte in a file

"the code"

Dim _fileName As String = Request.PhysicalApplicationPath & FileUpload1.FileName
Dim _byte() As Byte = FileUpload1.FileBytes()
Dim _file As New IO.FileStream(_fileName, IO.FileMode.Create)

For _i As Integer = 0 To _byte.Length - 1
_file.WriteByte(_byte(_i))

my problem is how to read this file ???

Here's an easier way to do that:

' Write byte array
My.Computer.FileSystem.WriteAllBytes(_fileName, _byte, False)
' Read byte array
 _byte = My.Computer.FileSystem.ReadAllBytes(_fileName)

But if you still want to use the FileStream:

Dim _FileSize As Long
_FileSize = _file.Length
For _i As Long = 0 To _FileSize - 1
   _byte(CInt(_i)) = CByte(_file.ReadByte())
Next _i