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?