hello all,
pls be patience to read this, pls

im doing a project in c#. to automate the downloading process..
my task is
1.Login to the website
2.Click the button on the next page(2nd page)
3.Click link and then a button on the next page(3rd page)
4.then the File download dialog box pop ups.


i ve did the first 3 steps using web browser control in c#. when the File download dialog prompts i got stumbled. getting known from this forum that automate clicking the File download dialog is not possible i am trying now to download the file by specifying its name using webclient in c#. whatever im trying leads to an exception.
i dont know whether webclient can function in the webbrowser control.

the code i ve used till is,

private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
webBrowser1.Document.GetElementById("user").InnerText = "xxxxxx";
            webBrowser1.Document.GetElementById("pass").InnerText = "yyyyyy";
            webBrowser1.Document.GetElementById("login").InvokeMember("click");
            do
            {
                Application.DoEvents();

            } while (webBrowser1.IsBusy != false);
webBrowser1.Document.GetElementById("imbutton").InvokeMember("click");
                do
                { Application.DoEvents();
                 } while (webBrowser1.IsBusy != false); //Inserted my new code here to download directlywebBrowser1.Document.GetElementById("select").InvokeMember("click");
                do
                { Application.DoEvents();
                 } while (webBrowser1.IsBusy != false);
                webBrowser1.Document.GetElementById("buttonz").InvokeMember("click");
                do
                {
                    Application.DoEvents();
                } while (webBrowser1.IsBusy != false);
}      //Here the File Download Dialog pop ups

the code i ve inserted new to download the files by name

WebClient myWebClient = new WebClient();
                myWebClient.DownloadFile("http:///File.aspx?id=100000", @"d:\xxx.doc");

this code leads to "The remote server returned an error: (407) Proxy Authentication Required." Exception

pls guide me in the right path.. where im doing wrong.

need help pls.

Comments
Well worded question :) shame about the title...

@adatapost: Thanks for trying to help, now go to bed and rest for your exhausting help.

This article has been dead for over six months. Start a new discussion instead.