Hi,
I tried this link to generate verification Image
http://codes.codedigest.com/CodeDigest/88-A-Simple-CAPTCHA-Image-Verification-in-C--and-ASP-Net.aspx
It works fine.
but I'd like to put a button in page for regenerating captcha for example When the image was unreadable for user.
so I put an updatepanel in page and this is my code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<tr>
<td colspan="2">
<asp:Image ID="imCaptcha" ImageUrl="~/Captcha.ashx" runat="server" />
<br />
<br />
<asp:CustomValidator ID="CustomValidator1" runat="server"
ControlToValidate="txt_verify"
ErrorMessage=""
OnServerValidate="CAPTCHAValidate" ValidationGroup="reg"></asp:CustomValidator>
</td>
<td colspan="2">
<asp:Button ID="btn_genCaptcha" runat="server" onclick="btn_genCaptcha_Click" Text="" ValidationGroup="genCaptcha" />
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
Although the image changes but the whole page is refreshed.
what's the problem?
Whether this is due to incompatibilities httphandler and updatepanel?
what's the solution?
Thanks a lot