//存
string ImgFName;
HttpPostedFile UpFile=UP_FILE.PostedFile;
FileLength=UpFile.ContentLength;//记录文件长度
try
{
if(FileLength==0)
{
cfun.alert(Response,"请选择要上传的图片");
}
else
{
Byte[] FileByteArray = new Byte[FileLength]; //图象文件临时储存Byte数组
Stream StreamObject = UpFile.InputStream; //建立数据流对像
int pos=UpFile.FileName.LastIndexOf("//");
ImgFName=UpFile.FileName.Substring(pos+1);
StreamObject.Read(FileByteArray,0,FileLength);
cmd=new SqlCommand("InsImage",con);
cmd.CommandType=CommandType.StoredProcedure;
con.Open();
cmd.Parameters.Add(new SqlParameter("@ImageData",SqlDbType.Image)).Value=FileByteArray;
cmd.Parameters.Add(new SqlParameter("@ImageName",SqlDbType.NVarChar)).Value=ImgFName;
cmd.Parameters.Add(new SqlParameter("@ImageExplain&