protected void Button1_Click(object sender, EventArgs e)
{
string path = Server.MapPath("~/上传的文件") + "//" + FileUpload1.FileName;
Label1.Text = FileUpload1.PostedFile.ContentType;
FileUpload1.SaveAs(path);
this.ClientScript.RegisterStartupScript(typeof(string), "ok", "<script>alert('上传成功')</script>");
Response.Write(path);
}
文件上传 的方法
最新推荐文章于 2024-02-02 11:19:58 发布