日期:2014-05-17 浏览次数:20744 次
public void FileUpload()
{
string path = AppDomain.CurrentDomain.BaseDirectory + ConfigurationManager.AppSettings["UploadPhotoPath"];//获取上传文件存放的路径
foreach (string upload in Request.Files)
{
//string a = Request.Files["FileUpload1"].ToString();
string filename = Path.GetFileName(Request.Files[upload].FileName);//获取上传文件的文件名
Request.Files[upload].SaveAs(Path.Combine(path, gid));//保存文件
}
Response.Write("<script>location.href='/ThingManage/ThingSJSL/?type=" + typeid + "'</script>");
}