Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / October 2007

Tip: Looking for answers? Try searching our database.

Downloading file using WebRequest

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tedmond - 21 Oct 2007 16:53 GMT
Dear all,

Is System.Net.WebRequest the correct class that I can use for downloading
file over http?  I can easily get a page contents using that class but have
no way to get a file from the web server.  Can anyone give me an idea how I
can do that?

Thanks for any help,

Tedmond
Kevin Spencer - 22 Oct 2007 11:40 GMT
An Http Request is a request for a file. When you download a page, you are
downloading a file with a .htm or similar extension.

Signature

HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

> Dear all,
>
[quoted text clipped - 8 lines]
>
> Tedmond
Tedmond - 22 Oct 2007 13:48 GMT
when I got the HttpWebResponse, how can I get the filename and save the
stream data into file?

> An Http Request is a request for a file. When you download a page, you are
> downloading a file with a .htm or similar extension.
[quoted text clipped - 11 lines]
> >
> > Tedmond
Kevin Spencer - 23 Oct 2007 12:23 GMT
The  HttpWebResponse contains information about the file downloaded, as well
as a stream containing the contents of the file. The ResponseUri contains
the URI to the resource (file), which also includes, of course, the file
name. See the following reference for details and some examples:

http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse.aspx

Signature

HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

> when I got the HttpWebResponse, how can I get the filename and save the
> stream data into file?
[quoted text clipped - 17 lines]
>> >
>> > Tedmond

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.