asp.net学习笔记·文件上传
简单上传
未做安全保护
if (FileUpload1.HasFile) { string strUpLoadPath = Server.MapPath("~/Images/"); TextBox1.Text = strUpLoadPath + FileUpload1.FileName; FileUpload1.SaveAs(strUpLoadPath + FileUpload1.FileName); //Response.Write(@" <script type = 'text/javascript'>alert('上传成功'); </script>"); labFileUpdateTrue.Visible = true; } else { labFileUpdateFalse.Visible = true; } } }