public void Synchronize() { if (lblError != null) { lblError.Visible = false; } if (IsSubmitting()) { LongTaskControl ltc = ((MasterPage)Page).GetLongTaskControl(); if (!ltc.IsBusy()) { ViewState["submitting"] = false; ICommandEventArgs args = ltc.ReleaseReturnArgs(); //Display errors if (args.Exception != null) { PageError("Error during submission: " + args.Exception.Message); } else { //Notify submission has been proced if (SubmissionProcessed != null) { SubmissionProcessed(this, new SubmissionEventArgs((Components.Submission)args.ReturnValue)); } } } } }
private void Page_Load(object sender, System.EventArgs e) { HtmlAnchor CourseMain = null; LinkButton cmdLogout = null; Label lblID = null; TabStrip tsVert = null; //Attempt to find the controls CourseMain = (HtmlAnchor)FindControl("CourseMain"); lblID = (Label)FindControl("lblID"); if (HasLogout) { cmdLogout = (LinkButton)FindControl("cmdLogout"); } if (HasTabs) { tsVert = (TabStrip)FindControl("tsVert"); } //Set up commonality int courseID = Convert.ToInt32(Request.Params["CourseID"]); if (CourseMain != null) { CourseMain.HRef = "course.aspx?CourseID=" + courseID; } if (cmdLogout != null) { cmdLogout.CausesValidation = false; cmdLogout.Click += new System.EventHandler(cmdLogout_Click); } if (lblID != null) { lblID.Text = Globals.CurrentUserName; } if (tsVert != null) { SetupTabStyle(tsVert); } Pagelet.FixControlDims(Controls[1]); ucMatrix = FindControl("ucMatrix"); ucLongTask = (LongTaskControl)FindControl("ucLongTask"); if (ucLongTask != null) { ucLongTask.Visible = ucLongTask.IsBusy(); ucMatrix.Visible = !ucLongTask.Visible; } }