第二次单击ASP.NET按钮时没有响应 [英] no response when I click the ASP.NET button at the second time
问题描述
有一个ASP.NET按钮,它调用以下代码。
There is an ASP.NET button which calls the following code.
Response.ClearHeaders();
                 Response.ClearContent();
  Response.Clear();&
  Response.Charset的= QUOT;中文英寸;
                &NBSP ;   Response.ContentEncoding = System.Text.Encoding.Default;
                     Response.AddHeader(QUOT;内容处置","附件;文件名= excel.xls");
Response.ClearHeaders();
Response.ClearContent();
Response.Clear();
Response.Charset = "big5";
Response.ContentEncoding = System.Text.Encoding.Default;
Response.AddHeader("content-disposition", "attachment; filename=excel.xls");
                     //Response.AddHeader("content-length" ;, file.Length.ToString());
                     Response.ContentType =" application / ms-excel";
//Response.AddHeader("content-length", file.Length.ToString());
Response.ContentType = "application/ms-excel";
      字节[] myExcel = System.IO.File.ReadAllBytes(QUOT; excel.xls");
          &NBSP ;         Response.OutputStream.Write(myExcel,0,myExcel.Length);
             &NBSP ;      Response.Flush();
byte[] myExcel = System.IO.File.ReadAllBytes("excel.xls");
Response.OutputStream.Write(myExcel, 0, myExcel.Length);
Response.Flush();
当第一次点击按钮时,有响应并有excel下载提示,但是当我再次点击按钮时没有响应。
When the button is first click, there is response and have excel download prompt, but there is no response when I click the button again.
为什么第二次单击ASP.NET按钮时没有响应?对它的任何解决方案?
why there is no response when I click the ASP.NET button at the second time? any resolution to it?
推荐答案
请在相关的官方论坛,以便为您提供更好的帮助。
Please post asp.net questions under related official forum for a better assistance on your case.
这篇关于第二次单击ASP.NET按钮时没有响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!