manutektips
Programmer
Hi,
I have a problem with opening a gif image. The code is below:
MyFileStream = New FileStream
(strTreeFilePath,FileMode.Open)
FileSize = MyFileStream.Length
Dim Buffer(CInt(FileSize)) As Byte
MyFileStream.Read(Buffer, 0, CInt(FileSize))
Response.ContentType = "image/GIF"
Response.AppendHeader("content-disposition", _
"attachment; filename=" + strTreeFilePath)
Response.OutputStream.Write(Buffer, 0, FileSize)
Response.Flush()
MyFileStream.Close()
Response.Close()
My program is generating a gif file dynamically and stored in a folder. When I try to open that file using the above code, the page is loaded but not picking up the file. This same programs works fine in 1 server but not in another, where both the servers are windows 2003. Please help
I have a problem with opening a gif image. The code is below:
MyFileStream = New FileStream
(strTreeFilePath,FileMode.Open)
FileSize = MyFileStream.Length
Dim Buffer(CInt(FileSize)) As Byte
MyFileStream.Read(Buffer, 0, CInt(FileSize))
Response.ContentType = "image/GIF"
Response.AppendHeader("content-disposition", _
"attachment; filename=" + strTreeFilePath)
Response.OutputStream.Write(Buffer, 0, FileSize)
Response.Flush()
MyFileStream.Close()
Response.Close()
My program is generating a gif file dynamically and stored in a folder. When I try to open that file using the above code, the page is loaded but not picking up the file. This same programs works fine in 1 server but not in another, where both the servers are windows 2003. Please help