I am trying to create a custom form component for a Captcha control (we can't use Google's reCaptcha due to their constant switching of IP addresses). According to the documentation, setting the CustomAutopostHandling value to true should prevent the form from auto posting when the control is changed. However, this is not working for me. Everytime I type something into the field, the form repost, refreshing my captcha. Is there something else that needs to be set to prevent this from happening? Or is there a simpler way to implement a component without the full properties class, similar to how widgets can be created?
Found a solution, though I'm not sure it's the correct one. I added the "data-ktc-notobserved-element" attribute to the HtmlAttributes for the control. This prevented the auto postback for the control.
Hi Lex,
You should be able to set the control's AutoPostBack property to false, to prevent an auto postback.
FormControl.AutoPostBack Property Gets or sets whether a postback automatically occurs.
Mike
Please, sign in to be able to submit a new answer.