G
Guest
I am trying to stream html content as excel data from a
webserver to an IE browser with the following ASP.NET code
First Scenario:
-----------------
An aspx page with a server side button control.
When button is clicked, form is posted and the following code is executed on the server side.
response.Buffer =true;
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
response.AppendHeader("Content-Disposition", "attachment;filename=sample.xls");
response.Write(data);
IE shows two Open/Save Dialog boxes. It is pretty weird for
the dialog to be prompted two times to download a single
file. I am not sure whether this is problem in IE or I
have to do any anything on the HTTP headers side..
I am using IE 6.0 with SP1.
Second Scenario:
--------------------
Another aspx page which has the same above listed code in the Page_Load event. When this page is requested , IE throws up only one
dialog box to download the file.
I am not sure why IE behaves differently under the above stated scenarios. I like IE to prompt only once. Any help to solve this problem will be appreciated.
Thanks
Krishna
webserver to an IE browser with the following ASP.NET code
First Scenario:
-----------------
An aspx page with a server side button control.
When button is clicked, form is posted and the following code is executed on the server side.
response.Buffer =true;
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
response.AppendHeader("Content-Disposition", "attachment;filename=sample.xls");
response.Write(data);
IE shows two Open/Save Dialog boxes. It is pretty weird for
the dialog to be prompted two times to download a single
file. I am not sure whether this is problem in IE or I
have to do any anything on the HTTP headers side..
I am using IE 6.0 with SP1.
Second Scenario:
--------------------
Another aspx page which has the same above listed code in the Page_Load event. When this page is requested , IE throws up only one
dialog box to download the file.
I am not sure why IE behaves differently under the above stated scenarios. I like IE to prompt only once. Any help to solve this problem will be appreciated.
Thanks
Krishna