Link to home
Start Free TrialLog in
Avatar of whiwex
whiwex

asked on

Download File using v.net

Does anyone have working VB.net code that will download a file when a button is clicked.
When a user connects to a web page there is a button that they click that will then download an excel file and ask the user where they want to save the file. I am not using windows form I am using vb.net with ajax controls. I have been trying to get this to work for sometime now. Pleas help
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of whiwex
whiwex

ASKER

This is almost working. The spreadsheet now opens but none of the menu items work.
Avatar of whiwex

ASKER

I have to use the browser back arrow to go back to the previous page.
Avatar of whiwex

ASKER

if I click refresh page in the browser the menu items work
Avatar of whiwex

ASKER

Actually non of the click envents work after the spreadsheet page is loaded.
I think Excel has disabled much of the functionality as the file has been downloaded from the internet. It shows an "Enable" button under the toolbar which you need to click to enable functionality.
Avatar of whiwex

ASKER

Thanks Just had to change the button from postbackurl to navigateurl