K
Keith
I have a minor problem with a piece of code I have written to download
a CSV file in an ASP.NET application. It works fine except that if the
user presses the Open button on the IE6 download dialogue, then the
dialogue is presented a second time. Pressing the Open button again
works fine. Pressing the save button also works fine.
The code (c#) looks like:
if (Page.IsPostBack) {
Response.Clear();
Response.BufferOutput=true;
Response.ContentType="application/csv";
Response.AppendHeader("content-disposition","attachment;
filename=servicelist.csv");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now);
Response.Write(sb.ToString());
Response.End();
return;
}
Any assistance would be appreciated.
Keith
a CSV file in an ASP.NET application. It works fine except that if the
user presses the Open button on the IE6 download dialogue, then the
dialogue is presented a second time. Pressing the Open button again
works fine. Pressing the save button also works fine.
The code (c#) looks like:
if (Page.IsPostBack) {
Response.Clear();
Response.BufferOutput=true;
Response.ContentType="application/csv";
Response.AppendHeader("content-disposition","attachment;
filename=servicelist.csv");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.Now);
Response.Write(sb.ToString());
Response.End();
return;
}
Any assistance would be appreciated.
Keith