Click here to Skip to main content
14,266,194 members
Rate this:
Please Sign up or sign in to vote.
See more:
How to stop web client downloading process and save it
and after that reset the process again

I don't want return downloading process to start I want to save it

What I have tried:

void start()
        Uri source = new Uri(comboBox1.Text);
        file = source.ToString();
        button1.Text = "Stop";
        path = comboBox2.Text;
        wc.DownloadProgressChanged += (s, z) =>
            label3.Text = $"Downloaded as MB: {((float)z.BytesReceived / 1048576).ToString("#.#")}";
            label4.Text = $"Downloaded {z.ProgressPercentage}%";
            progressBar1.Value = z.ProgressPercentage;
        wc.DownloadFileAsync(source, path + Path.GetFileName(source.ToString()));
        button3.Visible = true;
    void stop()
        button1.Text = "Start";
Gerry Schmitz 8-May-19 17:37pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100