The name 'Captcha1' does not exist in the current context
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"> <ContentTemplate> <tr> <td class="style4">Answer:</td> <td> <cc1:CaptchaControl ID="Captcha1" runat="server" CaptchaBackgroundNoise="Medium" CaptchaLength="5" CaptchaHeight="55" CaptchaWidth="200" CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" FontColor = "#FF33CC" CaptchaFontWarping="Medium" /> <asp:TextBox runat="server" ID="txtCaptcha" /> </td> </tr> </ContentTemplate> </asp:CreateUserWizardStep>
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { //Control Captcha1 = (Control)CreateUserWizardStep1.ContentTemplateContainer.FindControl("Captcha1"); TextBox txtCaptcha = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("txtCaptcha"); Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());//error occurred here if (Captcha1.UserValidated)//error occurred here { } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)