hi,
iam using captcha in asp.net with c# its working fine,but the problem is what ever captcha value i entered in text box that value i have to store in database, there are 5 characters in image as iam trying to store in database it is storing only one character
iam using this below code ,can anyone help me to get all characters
<pre><%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td colspan="3">
Enter Text
<asp:TextBox ID="txtCaptcha" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<cc1:CaptchaControl ID="Captcha1" runat="server" CaptchaBackgroundNoise="Low" CaptchaLength="5"
CaptchaHeight="60" CaptchaWidth="200" CaptchaMinTimeout="5" CaptchaMaxTimeout="240"
FontColor="#D20B0C" NoiseColor="#B1B1B1" />
</td>
<td>
<asp:ImageButton ImageUrl="~/refresh.png" runat="server" CausesValidation="false" />
</td>
</tr>
<tr>
<td>
<asp:CustomValidator ErrorMessage="Invalid. Please try again." OnServerValidate="ValidateCaptcha"
runat="server" />
</td>
<td align="right">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" />
</td>
<td>
</td>
</tr>
</table>
protected void ValidateCaptcha(object sender, ServerValidateEventArgs e)
{
Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim());
e.IsValid = Captcha1.UserValidated;
if (e.IsValid)
{
ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Valid Captcha!');", true);
}
}
can any body help me for getting
What I have tried:
i tried google serch as well,many examples but i can store only one character