E' passato molto tempo.
il controllo è WebControlCaptcha.dll ma proprio non ricordo dove l'ho pescato, sicuramente in rete.
ho ripescato La direttiva per il controllo:
<%@ Register Assembly="GURU4.net.Web.Controls.CaptchaLibrary" Namespace="GURU4.net.Web.Controls.CaptchaLibrary" TagPrefix="ccl" %>
ed il form:
Altro non mi ricordo anche perchè è da parecchio che non uso più asp.net.codice:<form id="frmMain" runat="server"> <div class="content"> <h1>Titolo</h1> <asp:PlaceHolder ID="phResult" runat="server" Visible="false"> <div class="response"> <asp:Label ID="lblName" runat="server" /></p> Close window</p> </div> </asp:PlaceHolder> <asp:PlaceHolder ID="phCaptcha" runat="server"> <hr /> <h2>Please enter your email address and the message</h2> <div class="fieldset"> <div class="fieldvalidator"> <asp:RegularExpressionValidator id="fvFirstname1" runat="server" ErrorMessage="Insert correct e-mail" ControlToValidate="da" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> <asp:RequiredFieldValidator ID="fvFirstname2" ErrorMessage="Insert your e-mail address" ControlToValidate="da" runat="server" ForeColor="" SetFocusOnError="true" Display="Dynamic" /> </div> <label for="da">e-mail address:</label> <asp:TextBox ID="da" runat="server" Width = "400px"></asp:TextBox> </div> <div class="fieldset"> <div class="fieldvalidator"> <asp:RequiredFieldValidator ID="fvLastname1" ErrorMessage="Please, insert message" ControlToValidate="messaggio" runat="server" ForeColor="" SetFocusOnError="true" Display="Dynamic" /> </div> <label for="messaggio">Text:</label> <asp:TextBox ID="messaggio" runat="server" Height="100px" Style="position: static" Width="400px"></asp:TextBox> <%--<asp:TextBox ID="messaggio" runat="server"></asp:TextBox>--%> </div> <hr /> <h2>Please enter the characters shown in the image (6 characters)</h2> </p> <div class="fieldset"> <label>Image:</label> <div class="captcha"><ccl:VisualCaptcha ID="vcCaptcha" runat="server" Width="260px" Height="80px" ChallengeTextLength="6" ToolTip="Codice di verifica" IgnoreCase="true" /></div> </div> <div class="fieldset"> <div class="fieldvalidator"> <asp:RequiredFieldValidator ID="fvCaptcha1" ErrorMessage="Type the characters that you see in the image" ControlToValidate="txtCaptcha" runat="server" ForeColor="" SetFocusOnError="true" Display="Dynamic" /> <ccl:VisualCaptchaValidator ID="fvCaptcha2" runat="server" ErrorMessage="The characters typed do not match the image displayed" ControlToValidate="txtCaptcha" ForeColor="" SetFocusOnError="true" AssociatedVisualCaptchaControlId="vcCaptcha" Display="Dynamic" /> </div> <label for="txtCaptcha">Enter characters shown:</label> <asp:TextBox ID="txtCaptcha" runat="server"></asp:TextBox> <div class="fieldnote">If you can not read the characters in the image try to <asp:LinkButton ID="btnCaptchaRefresh" runat="server" Text="refresh the image" CausesValidation="false" OnClick="btnCaptchaRefresh_Click" /></div> </div> <hr /> <div class="buttonset"> <asp:Button ID="btnConfirm" runat="server" Text="Send message" CssClass="btn" OnClick="btnConfirm_Click" /> </div> </asp:PlaceHolder> </div> </form>
Se non trovi il controllo te lo posto in privato
Buon lavoro.

Rispondi quotando