用input控件取得上传文件,以byte[]类型保存
System.IO.Stream imgStream = txtGazo.PostedFile.InputStream;
System.Drawing.Image img = System.Drawing.Image.FromStream(imgStream);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
Byte[] imgDat = new Byte[ms.length];
ms.Position = 0;
ms.Read(imgDat, 0, Convert.ToInt32(ms.length));