Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Multiple file uploads

Reply
Thread Tools

Multiple file uploads

 
 
!!bogus
Guest
Posts: n/a
 
      01-25-2005
Hi,

I found this code in the MSDN library. It works fine for a single upload,
but I can't figure out how to make it work for multiple file uploads...can
someone please help me?

Just paste it in an aspx file and it will work. Although I don't see the
HtmlInputFile class or the fileupload.aspx class that it refers to, it
somehow works.


<%@ Page Language="VB" AutoEventWireup="True" %>
<html>
<script runat="server">
Sub UploadBtn_Click(Sender as Object, e as EventArgs)

' Display information about posted file
FileName.InnerHtml = MyFile.PostedFile.FileName
MyContentType.InnerHtml = MyFile.PostedFile.ContentType
ContentLength.InnerHtml = cStr(MyFile.PostedFile.ContentLength)
FileDetails.Visible = True

' Save uploaded file to server
MyFile.PostedFile.SaveAs("c:\Uploadedfiles\uploadf ile.txt")
End Sub
</script>
<body>
<form action="fileupload.aspx"
method="post"
enctype="multipart/form-data"
runat="server">

<h1>ASP.NET File Upload Example</h1>
Select File To Upload to Server:
<input id="MyFile"
type="file"
runat="server">
<br><br>
<input type=submit
value="Upload!"
OnServerclick="UploadBtn_Click"
runat="server">
<br><br><br>
<div id="FileDetails"
Visible=false
runat="server">
FileName: <span id="FileName" runat="server"/> <br>
ContentType: <span id="MyContentType" runat="server"/> <br>
ContentLength: <span id="ContentLength" runat="server"/>bytes
<br>
</div>
</form>
</body>
</html>


--
Thank you
Please post only


 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      01-25-2005
"!!bogus" <(E-Mail Removed)> wrote in message
news:IKkJd.1667$(E-Mail Removed).. .
: Hi,
:
: I found this code in the MSDN library. It works fine for a single upload,
: but I can't figure out how to make it work for multiple file uploads...can
: someone please help me?
:
: Just paste it in an aspx file and it will work. Although I don't see the
: HtmlInputFile class or the fileupload.aspx class that it refers to, it
: somehow works.

<!--SNiP-->

All ASP.NET groups have dotnet in the name.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
 
Bullschmidt
Guest
Posts: n/a
 
      01-26-2005
And here is a classic ASP resource for letting the user upload one or
more files which is something that was unfortunately not built into ASP:

ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
http://aspzone.com/posts/160.aspx

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      01-26-2005
"Bullschmidt" wrote in message news:(E-Mail Removed)...
: And here is a classic ASP resource for letting the user upload one or
: more files which is something that was unfortunately not built into ASP:
:
: ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
: http://aspzone.com/posts/160.aspx

Perhaps since he's already using .NET, he should stick with that?!
http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
Bullschmidt
Guest
Posts: n/a
 
      01-26-2005
<<
Perhaps since he's already using .NET, he should stick with that?!
http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html

--
Roland Hall
>>


True (good point), but the topic is "Multiple file uploads" in a classic
ASP newsgroup and perhaps there is always at least the slightest
possibility that someone else may search this newsgroup in the future
actually looking to find an answer to the question.

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Roland Hall
Guest
Posts: n/a
 
      01-26-2005
"Bullschmidt" wrote in message news:eO2$(E-Mail Removed)...
: <<
: Perhaps since he's already using .NET, he should stick with that?!
: http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html
:
: --
: Roland Hall
: >>
:
: True (good point), but the topic is "Multiple file uploads" in a classic
: ASP newsgroup and perhaps there is always at least the slightest
: possibility that someone else may search this newsgroup in the future
: actually looking to find an answer to the question.

Ok, fair enough but don't think you won't be answering this same question
again. (O;=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple HTTP Sockets or Threads for file uploads. gberz3 Ruby 7 07-24-2008 02:42 AM
Multiple File Uploads =?Utf-8?B?U3RldmVu?= ASP .Net 4 04-04-2006 08:16 PM
Handling multiple file uploads on one 'page' darrel ASP .Net 3 03-21-2005 06:09 PM
Multiple File Uploads Ryan Ternier ASP .Net 3 07-08-2004 02:35 PM
Multiple file uploads with applet news.amnet.net.au Java 0 02-12-2004 08:40 AM



Advertisments