Example #1
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        if (TestScriptsManager.EasyTestEnabled)
        {
            TestScriptsManager testScriptsManager = new TestScriptsManager(Page);
            testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "FormCaption", TestControlType.Field, "FormCaption");
            testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "RequestUrl", TestControlType.Field, "RequestUrl");
            testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "DescriptionTextBox", TestControlType.Field, "Description");
            testScriptsManager.RegisterControl(JSDefaultTestControl.ClassName, "ReportButton", TestControlType.Action, "Report");
            testScriptsManager.AllControlRegistered();
            ClientScript.RegisterStartupScript(GetType(), "EasyTest", testScriptsManager.GetScript(), true);
        }
        if (WebApplication.Instance != null)
        {
            ApplicationTitle.Text = WebApplication.Instance.Title;
        }
        else
        {
            ApplicationTitle.Text = "No application";
        }
        Header.Title = "Application Error - " + ApplicationTitle.Text;

        ErrorInfo errorInfo = ErrorHandling.GetApplicationError();

        if (errorInfo != null)
        {
            RequestUrl.NavigateUrl  = errorInfo.Url;
            RequestUrl.Text         = errorInfo.Url;
            RequestUrl2.NavigateUrl = errorInfo.Url;
            RequestUrl2.Text        = errorInfo.Url;
            if (!string.IsNullOrEmpty(errorInfo.UrlReferrer))
            {
                HyperLinkReturn.NavigateUrl = errorInfo.UrlReferrer;
            }
            else
            {
                LiteralReturn.Visible   = false;
                HyperLinkReturn.Visible = false;
            }
            if (ErrorHandling.CanShowDetailedInformation)
            {
                DetailsText.Text = errorInfo.GetTextualPresentation(true);
            }
            else
            {
                Details.Visible = false;
            }
            ReportResult.Visible = false;
            ReportForm.Visible   = ErrorHandling.CanSendAlertToAdmin;
        }
        else
        {
            ErrorPanel.Visible = false;
        }
    }
Example #2
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        TestScriptsManager testScriptsManager = new TestScriptsManager(Page);

        testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "FormCaption", TestControlType.Field, "FormCaption");
        testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "RequestUrl", TestControlType.Field, "RequestUrl");
        testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "DescriptionTextBox", TestControlType.Field, "Description");
        testScriptsManager.RegisterControl(JSDefaultTestControl.ClassName, "ReportButton", TestControlType.Action, "Report");
        testScriptsManager.AllControlRegistered("");
        ApplicationTitle.Text =
            (WebApplication.Instance != null) ? WebApplication.Instance.Title : "No application";
        Header.Title   = "Application Error - " + ApplicationTitle.Text;
        Copyright.Text =
            (WebApplication.Instance != null) ? WebApplication.Instance.Info.GetAttributeValue("Copyright") : "";


        ErrorInfo errorInfo = ErrorHandling.GetApplicationError();

        if (errorInfo != null)
        {
            RequestUrl.NavigateUrl  = errorInfo.Url;
            RequestUrl.Text         = errorInfo.Url;
            RequestUrl2.NavigateUrl = errorInfo.Url;
            RequestUrl2.Text        = errorInfo.Url;
            if (!string.IsNullOrEmpty(errorInfo.UrlReferrer))
            {
                HyperLinkReturn.NavigateUrl = errorInfo.UrlReferrer;
            }
            else
            {
                LiteralReturn.Visible   = false;
                HyperLinkReturn.Visible = false;
            }
            if (ErrorHandling.CanShowDetailedInformation)
            {
                DetailsText.Text = errorInfo.GetTextualPresentation(true);
            }
            else
            {
                Details.Visible = false;
            }
            ReportResult.Visible = false;
            ReportForm.Visible   = ErrorHandling.CanSendAlertToAdmin;
        }
        else
        {
            ErrorPanel.Visible = false;
        }
        WebWindow.PatchIEForPNGImages(this);
    }
Example #3
0
    private void Page_Load(object sender, System.EventArgs e)
    {
        if (WebApplication.Instance != null)
        {
            ApplicationTitle.Text = WebApplication.Instance.Title;
        }
        else
        {
            ApplicationTitle.Text = "No application";
        }
        Header.Title = "Application Error - " + ApplicationTitle.Text;

        ErrorInfo errorInfo = ErrorHandling.GetApplicationError();

        if (errorInfo != null)
        {
            RequestUrl.NavigateUrl  = errorInfo.Url;
            RequestUrl.Text         = errorInfo.Url;
            RequestUrl2.NavigateUrl = errorInfo.Url;
            RequestUrl2.Text        = errorInfo.Url;
            if (!string.IsNullOrEmpty(errorInfo.UrlReferrer))
            {
                HyperLinkReturn.NavigateUrl = errorInfo.UrlReferrer;
            }
            else
            {
                LiteralReturn.Visible   = false;
                HyperLinkReturn.Visible = false;
            }
            if (ErrorHandling.CanShowDetailedInformation)
            {
                DetailsText.Text = errorInfo.GetTextualPresentation(true);
            }
            else
            {
                Details.Visible = false;
            }
            ReportResult.Visible = false;
            ReportForm.Visible   = ErrorHandling.CanSendAlertToAdmin;
        }
        else
        {
            ErrorPanel.Visible = false;
        }
    }
Example #4
0
    private void Page_Load(object sender, EventArgs e)
    {
        var testScriptsManager = new TestScriptsManager(Page);

        testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "FormCaption", TestControlType.Field,
                                           "FormCaption");
        testScriptsManager.RegisterControl(JSLabelTestControl.ClassName, "DescriptionTextBox", TestControlType.Field,
                                           "Description");
        testScriptsManager.RegisterControl(JSDefaultTestControl.ClassName, "ReportButton", TestControlType.Action,
                                           "Report");
        testScriptsManager.AllControlRegistered();
        if (WebApplication.Instance != null)
        {
            ApplicationTitle.Text = WebApplication.Instance.Title;
        }
        else
        {
            ApplicationTitle.Text = "No application";
        }
        Header.Title = "Application Error - " + ApplicationTitle.Text;

        ErrorInfo errorInfo = ErrorHandling.GetApplicationError();

        if (errorInfo != null)
        {
            if (ErrorHandling.CanShowDetailedInformation)
            {
                DetailsText.Text = errorInfo.GetTextualPresentation(true);
            }
            else
            {
                Details.Visible = false;
            }
            ReportResult.Visible = false;
            ReportForm.Visible   = ErrorHandling.CanSendAlertToAdmin;
        }
        else
        {
            ErrorPanel.Visible = false;
        }
    }