Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Is there a File Transfer Component

Reply
Thread Tools

Is there a File Transfer Component

 
 
Jon Turner
Guest
Posts: n/a
 
      01-26-2004
Is there a File Transfer component in .NET or an ActiveX that
will allow you to select a file to transfer from the client to the
server. A Freeby would be the most preferred.

Many thanks


 
Reply With Quote
 
 
 
 
Tom Kiefer
Guest
Posts: n/a
 
      01-26-2004
Try the "ASP.NET File Upload" section of
http://msdn.microsoft.com/library/en...duploading.asp

- Tom Kiefer
thogek @ earthlink . net


"Jon Turner" <Jon.Turner-> wrote in message
news:...
> Is there a File Transfer component in .NET or an ActiveX that
> will allow you to select a file to transfer from the client to the
> server. A Freeby would be the most preferred.
>
> Many thanks
>



 
Reply With Quote
 
 
 
 
dwa
Guest
Posts: n/a
 
      01-27-2004
The .NET framework supports it. You can use a standard HTML button with a
type of "file":

<INPUT type="file" id="buttonImage" runat="server" size="40">

When the user submits (posts the form back), you can process the file
transfer in a fashion similar to this (error checking left out for clarity):

public string postFile(HtmlInputFile theFile /* this is the server side
INPUT control */ )
{
string theFinalPath = "";

// Get the base file name of the posted file...
String aPostedFileName =
System.IO.Path.GetFileName(theFile.PostedFile.File Name);

// Get the physical path name for this application's virtual
directory...
String aPath = this.Server.MapPath(".\\");

// Save the file...
theFinalPath = aPath + "UploadedFiles\\" + aPostedFileName;
theFile.PostedFile.SaveAs(theFinalPath);

return theFinalPath;
}





 
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
Is there any POP3 and NNTP component I can use as a ASP Component? Miguel Minora ASP General 1 01-11-2005 10:16 PM
Remoting Component --> Com+ Component: Karuppasamy ASP .Net 0 01-15-2004 10:21 AM
com+ component and Component Service Karuppasamy ASP .Net 1 01-14-2004 11:30 PM
com+ component and Component Service Karuppasamy ASP .Net 0 01-13-2004 06:09 PM
Re: Calling a .NET component from a COM component remotely Soni ASP .Net 0 07-25-2003 04:33 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57