Render to Excel - only one excel instance
This is another one I posted at asp.net group a while ago.
I use following code to export the grid to Excel:
Response.ContentType = "application/ms-excel";
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new
It works fine until -- I opened TWO IEs:
I start the first browser, query the database and then render the grid.
I start the second browser, did a different query. then render the
grid. But it shows the result of the first browser. And more
interestingly, the content in the first browser is gone (Moved to the
I tried give it a file name, tried set the expiration. But nothing
Thanks in advance.
|All times are GMT. The time now is 04:38 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.