Asp.net| Program | upload | Source code This file is edited with vb.net, in Win2000+iis (installed). NET support), you can upload many commonly used file types.
RAR, ZIP, DOC, TXT, JPG, GIF and so on!
Direct download Save as ASPX format can
------------------------------------------------------------
<title> File Upload </title>
<body>
<form enctype= "Multipart/form-data" runat=server>
<input type=file id=fileup runat=server size= "><p>"
<asp:button Id=upload_button onclick=uploadfile text= "Upload" runat=server/>
</form>
<p>
<asp:label Id=uptype runat=server/>
</body>
<script LANGUAGE=VB runat=server>
Sub UploadFile (sender as object,e as EventArgs)
If fileup.postedfile.contentlength=0 Then
Uptype.text= "You have not chosen to upload the file!" "
Else
Dim Filesplit () as String=split (Fileup.postedfile.filename, "\")
Dim filename as string=filesplit (filesplit.length-1)
Fileup.postedfile.saveas (Server.MapPath (".") & "\" &filename)
uptype.text= "file name:" &fileup.postedfile.filename & "<br>" & _
"File Size:" &fileup.postedfile.contenttype & "<br>" & _
"File type:" &fileup.postedfile.contentlength
End If
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service