Click here to Skip to main content
15,902,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a task for using web browser in windows application to download the file from web site. I use the given code for this :

webBrowser1.Document.GetElementById("loginform:userName").InnerText = Username;
webBrowser1.Document.GetElementById("loginform:password").InnerText = PassWord;
webBrowser1.Document.GetElementsByTagName("select").GetElementsByName("Reports:j_idt44")[0].Document.GetElementsByTagName("option")[1].SetAttribute("selected", "selected");
                webBrowser1.Document.GetElementById("Reports:j_idt72:0").SetAttribute("checked", "checked");

After the execution the save dialog box will appear, but I dont want to show the dialog box, the file directly download. Anybody response the query.
Updated 3-Nov-14 23:12pm

1 solution

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900