ASPxCaptcha.ChallengeImageCustomRender Event

Enables you to implement custom logic for rendering the ASPxCaptcha’s challenge image.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll


public event ChallengeImageCustomRenderEventHandler ChallengeImageCustomRender

Event Data

The ChallengeImageCustomRender event's data class is ChallengeImageCustomRenderEventArgs. The following properties provide information specific to this event:

Property Description
Code Gets the code generated within the challenge image of the ASPxCaptcha control.
Image Provides access to a Bitmap object representing the ASPxCaptcha’s challenge image.


The ChallengeImageCustomRender event occurs before each render of the challenge image.

The parameters of the event argument allow you to obtain the generated code (ChallengeImageCustomRenderEventArgs.Code) and draw a custom image (ChallengeImageCustomRenderEventArgs.Image).


This example demonstrates how the ChallengeImageCustomRender event of the ASPxCaptcha control can be used to implement a custom challenge image.

View Example

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <dx:ASPxCaptcha ID="ASPxCaptcha1" runat="server" OnChallengeImageCustomRender="ASPxCaptcha1_ChallengeImageCustomRender">

See Also