以流方式打开文件并输出到网页
FileStream fs = new FileStream(@"C:\annex\Picture\SmallPicture\T20070725152344191002.jpg", FileMode.Open, FileAccess.Read);
byte[] mydata = new byte[fs.Length];
int Length = Convert.ToInt32(fs.Length);
fs.Read(mydata, 0, Length);
fs.Close();
Response.ClearContent();
Response.ContentType = "application/octet-stream";
this.Response.OutputStream.Write(mydata, 0, Length);
this.Response.End();
byte[] mydata = new byte[fs.Length];
int Length = Convert.ToInt32(fs.Length);
fs.Read(mydata, 0, Length);
fs.Close();
Response.ClearContent();
Response.ContentType = "application/octet-stream";
this.Response.OutputStream.Write(mydata, 0, Length);
this.Response.End();