Click here to Skip to main content
11,709,844 members (72,728 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: WebBrowserControl
I have a c# desktop app which connects to a site via a web browser control. The problem is I need to navigate to a specific section and download a excel file which is generated from a postback. I would like to either automate this process or bypass the file download dialog and save the file directly to a local drive. Problem The link is not a standard url. The site uses a postback script to get the file needed which then displays the file download dialog box. E.g. When you click on the button (javascript: postback) the file download dialog box is automatically loaded.

As stated I want to bypass the save options and automatically store the file in a predefined location. Any help would be much appreciated.

[Edit]Code block formatting removed[/Edit]
Posted 3-Nov-12 6:04am
Edited 3-Nov-12 6:11am
(no name)164.7K
Abhishek Pant at 3-Nov-12 13:59pm
Does the application contains self Webbrowser? If not you can't do this with as every user has its account privilege that has option to restrict the process.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 524
1 OriginalGriff 250
2 Peter Leow 229
3 Maciej Los 180
4 Mika Wendelius 125
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 3 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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