按道理該一行行顯示啊,為啥我的還是等會然後全部刷新出來
<%@ WebHandler Language="C#" Class="Responseflush" %>
using System;
using System.Web;
public class Responseflush : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/html";
for(int i = 0; i < 20; i++)
{
System.Threading.Thread.Sleep(500);
context.Response.Write("第" + i + "步執行完成!</br>");
context.Response.Flush();
}
}
public bool IsReusable {
get {
return false;
}
}
}
應該是ie的問題。。chrome,Firefox測試沒有問題