日期:2014-05-18 浏览次数:20772 次
//保存文件到指定目录(虚拟目录)
postedFile.SaveAs(System.Web.HttpContext.Current.Server.MapPath("~/Upload/") +NewFileName);
//保存的路径
public void SaveBmp(System.Drawing.Bitmap jpg, string filePath)
{
string FileName = System.Web.HttpContext.Current.Server.MapPath("~/UploadImages/") + System.Guid.NewGuid().ToString() + ".jpg";
jpg.Save(FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}