TracingOutput.aspx : Thread « Development « ASP.NET Tutorial






<%@Page trace="true" %>
<%@Import namespace="System.Threading" %>
<script language="C#" runat="server">
protected void Page_Load(object o, EventArgs e) {
  Trace.Write("MyInfo", "started Page_Load");
  for(int i = 0; i < 20; i++) {
    Thread.Sleep(100);
    Response.Write(i + "<br/>");
    Trace.Write("MyInfo", "loop iteration number " + i);
  }
  Trace.Write("MyInfo", "ending Page_Load");
}
</script>








9.43.Thread
9.43.1.TracingOutput.aspx
9.43.2.Start a thread
9.43.3.Sleep a server thread