FileStream stream =
new
FileStream(Server.MapPath(
"picture.gif"
),FileMode.Open);
long
FileSize = stream.Length;
byte
[] Buffer =
new
byte
[(
int
)FileSize];
Response.ContentType = "image/gif";
stream.Read(Buffer,0,(
int
)FileSize);
stream.Close();
Response.BinaryWrite(Buffer);
只需加上红色这段代码就可以了