Dim ImgData() As Byte
Dim ImgDataStream As Stream
Dim n As Integer
If titlefile.PostedFile.FileName.Length > 0 Then
If Me.titlefile.PostedFile.ContentLength <> 0 Then
ImgDataStream = Me.titlefile.PostedFile.InputStream
ReDim ImgData(Me.titlefile.PostedFile.ContentLength)
'将文件数据转换为Byte型
n = ImgDataStream.Read(ImgData, 0, Me.titlefile.PostedFile.ContentLength)
ImgDataStream.Close()
end if
end if
Dim ImgDataStream As Stream
Dim n As Integer
If titlefile.PostedFile.FileName.Length > 0 Then
If Me.titlefile.PostedFile.ContentLength <> 0 Then
ImgDataStream = Me.titlefile.PostedFile.InputStream
ReDim ImgData(Me.titlefile.PostedFile.ContentLength)
'将文件数据转换为Byte型
n = ImgDataStream.Read(ImgData, 0, Me.titlefile.PostedFile.ContentLength)
ImgDataStream.Close()
end if
end if