<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub SubmitButton_Click(Source As Object, e As EventArgs)
MyFile.PostedFile.SaveAs(txtFileSaveAs.Value)
TheMessage.InnerHTML = "File uploaded!"
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Upload Sample Page</TITLE>
</HEAD>
<BODY>
<form enctype="multipart/form-data" runat="server">
Enter the name and path of the file to upload:
<input
id="MyFile"
type="file"
runat="server"
>
<BR><BR>
Enter the name only to save the file as: <BR>
<input
id="txtFileSaveAs"
type="text"
runat="server"
>
<BR><BR>
<span
id="TheMessage"
runat="server"
>
</span>
<BR><BR>
<input
runat="server"
type=button
value="Upload"
OnServerClick="SubmitButton_Click"
>
</Form>
</BODY>
</HTML>
|