Beispiel #1
0
    protected void CreateTestimonialButton_Click(object sender, EventArgs e)
    {
        try
        {
            ErrorMessagePanel.Visible = SuccMessagePanel.Visible = false;

            if (!Member.IsLogged)
            {
                AccessManager.RedirectIfDisabled(false);
            }

            string body      = InputChecker.HtmlEncode(BodyTextBox.Text, BodyTextBox.MaxLength, L1.TEXT);
            string signature = InputChecker.HtmlEncode(SignatureTextBox.Text, SignatureTextBox.MaxLength, U5008.SIGNATURE);

            Testimonial.Add(Member.CurrentId, body, signature);
            ClearAll();
            SuccMessagePanel.Visible = true;
            SuccMessage.Text         = U5008.THANKSFORFEEDBACK;
        }
        catch (Exception ex)
        {
            if (ex is MsgException)
            {
                ErrorMessagePanel.Visible = true;
                ErrorMessage.Text         = ex.Message;
            }
            else
            {
                ErrorLogger.Log(ex);
            }
        }
    }