2

I'm trying to make asp.net mvc application to be shown in c# webbrowser component. Everything works fine except file downloading. In this mvc application there is a lot of side components, so there was found no other way to handle downloadFileLink but to use following JS:

function downloadButtonClick(s, e, buttonID, actionUrl) {
    var downloadUrl = actionUrl + '?FileID=' + s.GetRowKey(e.visibleIndex);
    if (e.buttonID == buttonID) {
        window.location = downloadUrl;
    }
}

this approach works fine while I'm trying to download file by this link using any browser, except webbrowser component.
It seems to ignore all window.location manipulations(I've tried window.location.href = downloadUrl and window.location.replace(downloadUrl))

Can anyone give a reason to this behavior?

Kamil Budziewski
  • 21,193
  • 12
  • 77
  • 95
Quadrat137
  • 400
  • 4
  • 18

1 Answers1

2

In case your web page doesn't work properly in WebBrowser control, but does well in the full Internet Explorer browser, consider implementing Feature Control.

Community
  • 1
  • 1
noseratio
  • 56,401
  • 21
  • 172
  • 421