Tab

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

Declaration

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.

Remarks

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).

Example

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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <dx:ASPxCaptcha ID="ASPxCaptcha1" runat="server" OnChallengeImageCustomRender="ASPxCaptcha1_ChallengeImageCustomRender">
        </dx:ASPxCaptcha>

    </div>
    </form>
</body>
</html>
See Also