<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<%@ Import Namespace="System.Web " %>
<html>
<head>
    <script language="VB" runat="server">
	sub ExecUpload(sender as Object,e as EventArgs)
	if Text1.Value="" then
		Span1.InnerHtml = "未选择文件"
		return
	end if
	if Not IsNothing(File1.PostedFile) then
		try
			File1.PostedFile.SaveAs(Request.PhysicalApplicationPath & Text1.Value)
			Span1.InnerHtml = "完成上传至" & Request.PhysicalApplicationPath & Text1.Value & "<br>上传大小：" & File1.PostedFile.ContentLength & "字节数"
		catch Uperr as Exception
			Span1.InnerHtml = "错误，无法上传至" & Request.PhysicalApplicationPath & Text1.Value & "，可能路径不存在<br>系统错误信息：" & Uperr.ToString()
		end try
	end if
	end sub
    </script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
    <form enctype="multipart/form-data" runat="server">
        选择上传文件: <input id="File1" type=file runat="server" size="30"><p>
        上传为(不含路径): <input id="Text1" type="text" runat="server" SIZE="30"><p>
        <span id=Span1 style="font: 9pt verdana;" runat="server" /><p>
        <input type=button id="Button1" value="执行上传" OnServerClick="ExecUpload" runat="server">
    </form>
</body>
</html>



