Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // check if the page was called properly
            if (Request.Params["ID"] != null)
            {
                Guid id = new Guid(Request.Params["ID"]);
                // check if there is a result in the controller
                if (SimpleProcessCollection.GetResult(id) == String.Empty)
                {
                    // no result - let's refresh again
                    Response.AddHeader("Refresh", "3");
                }
                else
                {
                    // everything's fine, we have the result
                    lblStatus.Text = "Job is done.";

                    //ImageStatus.Visible = false;
                }
            }
            else
            {
                Response.Redirect("Start.aspx");
            }
        }
Пример #2
0
 // this is a stub for a asynchronous process
 protected void LongRunningProcess()
 {
     // do nothing actually, but there should be real code
     // for instance, there could be a call for a remote web service
     Thread.Sleep(9000);
     // add result to the controller
     SimpleProcessCollection.Add(id, "Some result.");
 }