public static MvcCaptcha GetRegistrationCaptcha() { // create the control instance MvcCaptcha registrationCaptcha = new MvcCaptcha("RegistrationCaptcha"); registrationCaptcha.UserInputClientID = "CaptchaCode"; // all Captcha settings have to be saved before rendering registrationCaptcha.SaveSettings(); return(registrationCaptcha); }
public static MvcCaptcha GetRegistrationCaptcha() { // create the control instance MvcCaptcha registrationCaptcha = new MvcCaptcha("RegistrationCaptcha"); registrationCaptcha.UserInputClientID = "CaptchaCode"; // all Captcha properties are set in this event handler registrationCaptcha.InitializedCaptchaControl += new EventHandler<InitializedCaptchaControlEventArgs>( RegistrationCaptcha_InitializedCaptchaControl); // all Captcha settings have to be saved before rendering registrationCaptcha.SaveSettings(); return registrationCaptcha; }