我有一个网页,其中的数据将在按钮单击时导出。
导出完成后,我需要将消息显示为“已成功导出”。
但是导出消息后没有显示...
我的代码:
protected void btnGenReport_Click(object sender, EventArgs e)
{
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
hw.WriteLine("Sample Text");
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "inline;filename=\"Sample.xls\"");
Response.Write(tw);
Response.End();
lblMessage.Text = "Exported Successfully";
}
我应该如何显示消息......