Solved

Download a media file

Posted on 2009-05-10
11
214 Views
Last Modified: 2013-12-17
hi

I want the code for download the media filein C#
0
Comment
Question by:KaranGupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
11 Comments
 

Author Comment

by:KaranGupta
ID: 24352156
In the first article on which Webclient is used

when downloading it didn't ask for the location at runtime where you want to save the file.

Is that possible
0
 

Author Comment

by:KaranGupta
ID: 24353185
Hi

Should I elaborate More
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:jaydee-cdgp
ID: 24360552
Use DownloadFile()

There are two ways of downloading a file from a web site using WebClient, depending on whether we want to save the file, or process the contents of the directly within your application. If we simply want to save the file then we should call the DownloadFile() method takes two parameters, The URL from where we want to retrieve the file, and the file name ( or path) that we want to save the file to.
0
 

Author Comment

by:KaranGupta
ID: 24361125
Hi

I have used the following code from the website

WebClient Client = new WebClient();
Client.DownloadFile("http://www.csharpfriends.com/Members/index.aspx", " index.aspx");

But this code will directly download the file
0
 

Author Comment

by:KaranGupta
ID: 24382077
Hi
Any Updates
0
 
LVL 6

Accepted Solution

by:
jaydee-cdgp earned 500 total points
ID: 24391593
0
 
LVL 21

Expert Comment

by:MogalManic
ID: 24394365
I'm confused.  You want to download a file, but WebClient.DownloadFile() (which downloads it) doesn't prompt you.

If you want a prompt, use the System.Windows.Forms.MessageBox class
http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox(VS.80).aspx
0
 

Author Comment

by:KaranGupta
ID: 24408755
Is there any other method to do that
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question