Esempio n. 1
0
        private void AddAsirraValidation()
        {
            if (IsPostBack && !Asirra.ValidateAsirraChallenge(Request["Asirra_Ticket"]))
            {
                // If the Asirra ticket is not valid, stop the submission.
                Response.Redirect(Request.RawUrl);
            }

            var submitButton = (Button)ContactForm.FindControl("FormView").FindControl("SubmitButton");

            submitButton.OnClientClick = string.Format(@"if (!validateAsirraChallenge(""{0}"")) return false;", submitButton.ClientID);
        }