Hi,
if a page consist of more then one ascx file containing the code below,
then the correct captcha code can never be entered by the user(isValid allways = false).
Code behind like this:
If only one r.a.d.captcha, with this "external" textbox approace is on the page - then no problem!
if a page consist of more then one ascx file containing the code below,
then the correct captcha code can never be entered by the user(isValid allways = false).
<table style="border: solid 1px #323232; background-color: #efefef"> |
<tr valign="bottom"> |
<td colspan="2"> |
<span style="font-weight: bold; font-size: 11px">For en sikkerheds skyld...</span> |
</td> |
</tr> |
<tr valign="bottom"> |
<td style="background-color: #efefef"> |
<telerik:RadCaptcha ID="RadCaptcha1" runat="server" CaptchaImage-RenderImageOnly="true" CaptchaImage-Height="32" CaptchaImage-Width="90" CaptchaImage-TextColor="#323232" CaptchaImage-LineNoise="Low" CaptchaImage-FontWarp="None" CaptchaImage-BackgroundColor="#efefef" ErrorMessage="Tast koden igen!" Display="Dynamic" CaptchaTextBoxCssClass="captchaBox" ImageStorageLocation="Cache" EnableViewState="true"> |
</telerik:RadCaptcha> |
<div style="padding-bottom: 7px"></div> |
</td> |
<td> |
<asp:TextBox ID="CaptchaInput" runat="server" MaxLength="5" Width="50" Font-Size="13px" BackColor="white"> </asp:TextBox> |
<br /> |
<span style="background-color: #efefef; color: #000">Tast koden</span> |
</td> |
</tr> |
</table> |
<asp:Button ID="Tilmeld" OnClick="SendEmailNu" title="Tilmeld" runat="server" CssClass="button" Text="Tilmeld"> </asp:Button> |
Code behind like this:
protected void SendEmailNu(Object sender, EventArgs e) |
{ |
RadCaptcha1.ValidatedTextBoxID = CaptchaInput.UniqueID; |
RadCaptcha1.Validate(); |
if (RadCaptcha1.IsValid) |
{ |
If only one r.a.d.captcha, with this "external" textbox approace is on the page - then no problem!