我想生成一个(报告)文件供用户下载,然后向用户显示一条消息以显示该过程已成功完成。
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"
但是,当我使用创建“另存为”框时,似乎完全停止了消息的出现。这是为什么?任何人都可以提出解决方法吗?