0
protected void Page_Load(object sender, EventArgs e)
{
Response.Buffer = false;
while (true)
{
Response.Write(Delimiter + DateTime.Now.ToString("HH:mm:ss.FFF"));
Response.Flush();
// Suspend the thread for 1/2 a second
System.Threading.Thread.Sleep(500);
}
// Yes I know we'll never get here, it's just hard not to include it!
Response.End();
}
当Response.Flush()被执行,新的网页被发送到客户端 的,而块将服务器 当新maeeage到达客户端上运行下去,有为新数据刷新 继续保持同一位置的可行性如何?不应该创建新的Page对象吗?。我不明白这一点