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
  • 22,699
  • 14
  • 85
  • 105
alex_java_kotlin
  • 429
  • 6
  • 19

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
  • 59,932
  • 34
  • 208
  • 486