<html>
<script language="VB" runat="server">
Sub UploadBtn_Click(Sender as Object, E as EventArgs)
UploadFile.PostedFile.SaveAs(Server.MapPath("chunfeng.jpg"))
MyImage.ImageUrl = "chunfeng.jpg"
MyImage.Visible = true
End Sub
</script>
<head>
<title>星河影动之最简单的上传文件</title>
</head>
<body>
<form enctype="multipart/form-data" runat="server">
<h3>请选择上传的文件: <input id="UploadFile" type="file" runat="server"> <asp:button Text="上传文件" onClick="UploadBtn_Click" runat="server/"> </h3>
<hr>
<asp:image id="MyImage" Visible="false" runat="server/">
</form>
</body></html>
[1]
本文章来源于网络,作者是:,由代码部落进行采编,如涉及侵权请联系删除!转载请注明出处:https://daimabuluo.cc/biancheng10000wen/1122.html