Uploading files from client to server

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2008
Posts: 2
Reputation: shravan.donthul is an unknown quantity at this point 
Solved Threads: 0
shravan.donthul shravan.donthul is offline Offline
Newbie Poster

Uploading files from client to server

 
0
  #1
Apr 30th, 2008
Hi all,
In my form i have listbox,file upload control and button .

Using file upload control am adding the files to listbox which i want to upload to server.
On clicking button, i want the files to be uploaded to server which are in listbox.


Please suggest me how to do this.

Regards,
Shravan.D
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 169
Reputation: ptaylor965 is an unknown quantity at this point 
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Re: Uploading files from client to server

 
0
  #2
Apr 30th, 2008
Add a FileUpload control to your page
  1. <asp:FileUpload ID="FileUpload" runat="server" Width="408px" />
And then add this code to your upload button
  1. 'Save uploaded file to server
  2. FileUpload.PostedFile.SaveAs(Server.MapPath("~/UserImages/") & _
  3. FileUpload.PostedFile.FileName)
  4.  
Last edited by ptaylor965; Apr 30th, 2008 at 2:57 am.
Peter Taylor
Visual Basic.NET Application Developer

TaylorsNet
http://www.taylorsnet.co.uk
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 2
Reputation: shravan.donthul is an unknown quantity at this point 
Solved Threads: 0
shravan.donthul shravan.donthul is offline Offline
Newbie Poster

Re: Uploading files from client to server

 
0
  #3
Apr 30th, 2008
thanks for ur reply,

but files which are to be upload are in listbox not in fileupload control.

(i want to upload files from listbox to server not from fileupload control.)

Here Listbox contains full path of the files.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC