Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friends,

here is my code in webBrowser1_DocumentCompleted() method. when i click on link it show save file dialog.my requirement is save files on provided folder path without any pop up through c# code or java Script.


C#
foreach (HtmlElement row in webBrowser1.Document.Window.Frames["View_Frame"].Document.GetElementsByTagName("TR"))
{
  foreach (HtmlElement link in row.GetElementsByTagName("A"))
  {
  //code to click on weblink to download files.  
  }
}
Posted
Updated 26-Oct-17 23:10pm
v2
Comments
Johnny J. 15-Jul-13 4:32am    
DON'T POST THE SAME QUESTION OVER AND OVER AGAIN!

1 solution

Depending on what you want to save, if you want to save text, I suggest you use the following code, get the text that you need into a richTextBox and that's it:

richTextBox1.SaveFile(@InsertLocationHere);

If it's not text, then tell me what exactly the file extension is.
 
Share this answer
 
Comments
ALTT 18-Jul-13 3:17am    
i tryed this but not working

WebClient client = new WebClient();
client.Credentials = new NetworkCredential("username", "pwd");
client.DownloadFile(new Uri("https://infodirect.pershing.com/cehttp/servlet/MailboxServlet?operation=DOWNLOAD&mailbox_id=id3auhfu&batch_num=0069843&data_format=A&batch_id=071213.ACCT"), @"C:\Downloads\071213.ACCT");

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