using System.IO;
private byte[] FillPlanarGraph(FileUpload fileUpload)
{
//得到提交的文件
Stream fileDataStream = fileUpload.PostedFile.InputStream;
//得到文件大小
int fileLength = fileUpload.PostedFile.ContentLength;
//创建数组
byte[] curImg = new byte[fileLength];
//把文件流填充到数组
fileDataStream.Read(curImg, 0, fileLength);
//得到文件名字
string fileTitle = FileUpload1.Value;
//得到文件类型
string fileType = FileUpPlanar.PostedFile.ContentType;
return curImg;
}