Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Encore un nouveau venu dans SLExtensions. Voici un contrôle de captcha qui se branche sur le service gratuit www.recaptcha.net.
<UserControl x:Class="SLExtensions.Showcase.PageRecaptcha"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:slec="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls"
Width="400" Height="300">
<StackPanel x:Name="LayoutRoot" Background="White">
<slec:ReCaptcha x:Name="captcha" PublicKey="6LesLAMAAAAAACjPBtyjD80bwTowvEQrslT8bJvT" HorizontalAlignment="Center" VerticalAlignment="Center" >
<slec:ReCaptcha.Verifier>
<slec:ReCaptchaHttpPostVerifier Url="/VerifyCaptcha.aspx" Success="ReCaptchaHttpPostVerifier_Success" Failed="ReCaptchaHttpPostVerifier_Failed"/>
</slec:ReCaptcha.Verifier>
</slec:ReCaptcha>
</StackPanel>
</UserControl>
Pour utiliser le contrôle, vous devez fournir un objet qui implémente l’interface IReCaptchaVerifier. C’est lui qui va se charger de faire l’appel au webservice vers votre serveur. Dans SLExtensions, j’ai ajouté une classe d’exemple qui fait un POST http des informations ainsi que la page aspx qui valide les informations auprès de recaptcha.
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, u