首页 > 编程 > ASP > 正文

asp+ VB上传文件代码

2024-05-04 11:06:17
字体:
来源:转载
供稿:网友
<html>

<script language="vb" runat=server>

sub uploadbtn_click(sender as object, e as eventargs)

uploadfile.postedfile.saveas(server.mappath("test.jpg"))
myimage.imageurl = "test.jpg"
myimage.visible = true

end sub

</script>

<body>

<form enctype="multipart/form-data" runat=server>

<h3>

select file to upload: <input id="uploadfile" type=file runat=server>

<asp:button text="upload me!" onclick="uploadbtn_click" runat=server/>

<hr>

<asp:image id="myimage" visible=false runat=server/>

</form>

</body>
</html>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表