Click here to Skip to main content
15,907,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI
I have Developed a website ,
Having a login page.
The username and Login Credentials are carried through out the website.
I have Download Page within the website.
The Name and IDs of the Files are Shown in a GridView.
The user Selects a particular ID and then Clicks the Download Button.
Then It redirects the page where the Download Script is Written, Save File Window opens and user can save the File wherever he wants to,page Redirects
back to the Same page having the List of the Files .

Now Here I want to Integrate this Download page in a windows Application.
For this I am using a webBrowser Control.
On Form Load I am loading the Webbrowser Control with the URL of that website.
I have managed to pass the credentials from windows to the web login page.
And then Navigates to the Download Page.
Next when I Select the File to Download and Click the Download button within the Page.I have not Placed any Download Button in my Form. I am Just Opening the Page in the WebBrowser Control and Doing the Same thing.

But When I am Clicking the Download Button ,Internet Explorer window Gets Open Outside the Application,may be due to that The Page is redirecting to another URL. and here its Loosing all the login Credentials and not allowing me to Download the Files.

Is there any way so that Page redirects within the Webbrowser Control and File can be downloaded inside the windows application only.

I Have used JavaScript on the Download button click event which is fetching the Selected File ID and then redirecting to the Download Script page.

How can I download the File within Application itself.
Please assist.>
Posted

1 solution

Have a look at this site...

http://social.msdn.microsoft.com/Forums/vstudio/en-US/64a51959-f187-4736-97e0-8944dd1b059d/how-to-download-file-from-the-internet-to-my-computer-vbnet-windows-aplication?forum=vbgeneral

Or...

http://msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx
 
Share this answer
 
v2

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