<%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Captcha.RefreshImage.DefaultVB"CodeFile="DefaultVB.aspx.vb" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link href="Styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function pageLoad() {
//Disable autoComplete
var customCaptchaTextbox = $get("<%=txtRadCaptcha.ClientID %>");
if (customCaptchaTextbox)
customCaptchaTextbox.setAttribute("autoComplete", "off");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecorationZoneID="zoneToDecorate"
DecoratedControls="All" />
<div class="demo-containers">
<div class="demo-container" id="zoneToDecorate">
<telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Page not valid. The code you entered is not valid."
ValidationGroup="Group" EnableRefreshImage="true">
<CaptchaImage ImageCssClass="imageClass"></CaptchaImage>
</telerik:RadCaptcha>
<asp:Label ID="lblTxtRadCaptcha" Text="Custom Captcha Textbox" Visible="false" runat="server" />
<asp:TextBox ID="txtRadCaptcha" runat="server" Visible="false" MaxLength="5"></asp:TextBox>
<div style="margin-top: 15px;">
<telerik:RadButton RenderMode="Lightweight" ID="btnValidate" runat="server" Text="Verify Code" ValidationGroup="Group">
</telerik:RadButton>
</div>
</div>
</div>
<br />
<br />
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="cbCustomTextBox" EventName="CheckedChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="txtRadCaptcha"></telerik:AjaxUpdatedControl>
<telerik:AjaxUpdatedControl ControlID="lblTxtRadCaptcha"></telerik:AjaxUpdatedControl>
<telerik:AjaxUpdatedControl ControlID="RadCaptcha1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<qsf:ConfiguratorPanel ID="Configuratorpanel1" runat="server">
<Views>
<qsf:View>
<qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Wide">
<ul class="fb-group">
<li><span class="checkbox">
<asp:CheckBox ID="cbCustomTextBox" runat="server" AutoPostBack="true" Text="Use the TextBox below to enter the RadCaptcha Code"
OnCheckedChanged="EnableCustomTextBoxValidation"></asp:CheckBox></span>
</li>
</ul>
</qsf:ConfiguratorColumn>
</qsf:View>
</Views>
</qsf:ConfiguratorPanel>
</form>
</body>
</html>