ユーザーがダウンロードする (レポート) ファイルを生成し、プロセスが正常に完了したことを示すメッセージをユーザーに表示したいと考えています。
Dim myFile As FileInfo = New FileInfo(<filepath>)
'My function to generate a report (this can take a few minutes)
GenerateReport(myFile.FullName)
'Prompt user with "save as" dialog box.
Response.Clear()
Response.ClearHeaders()
Response.AddHeader("Content-Disposition", "attachment; filename=" & _
Response.WriteFile()
'Give message to say generation is complete. (This line doesn't take effect)
lblMsg.Text = "Generation complete"
ただし、「名前を付けて保存」ボックスを作成すると、メッセージがまったく表示されないようです。何故ですか?そして、誰かがそれを回避する方法を提案できますか?