Dim result() As Byte
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment; filename=" & sFilename & "")
The problem is that it opens a blank window where it opens up the Save/Open dialog. And I do not want another window opening up. Everything works fine when I try to export from an ordinary window.
I've tried putting <base target=_self> in my aspx file. What happens is the modal window seems to just refresh itself, but the Save/Open dialog doesn't appear anymore.