Class Captcha
Represents the Captcha UI element.
Implements
Inherited Members
Namespace: Syncfusion.JavaScript.Web
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class Captcha : CommonControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
Captcha()
Declaration
public Captcha()
Fields
imageValue
Represents the image value.
Declaration
public string imageValue
Field Value
Type | Description |
---|---|
System.String |
refreshPanelMaximunHeight
Sets the default value for refresh panel maximun height.
Declaration
public int refreshPanelMaximunHeight
Field Value
Type | Description |
---|---|
System.Int32 |
refreshPanelMinimumHeight
Sets the default value for refresh panel minimum height.
Declaration
public int refreshPanelMinimumHeight
Field Value
Type | Description |
---|---|
System.Int32 |
refreshPanelMinimumWidth
Sets the default value for refresh panel minimum width.
Declaration
public int refreshPanelMinimumWidth
Field Value
Type | Description |
---|---|
System.Int32 |
Valid
Sets the default value for Valid property.
Declaration
public bool Valid
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
CharacterSet
Gets or sets the character set of the Captcha that will be used to generate captcha text randomly.
Declaration
public string CharacterSet { get; set; }
Property Value
Type | Description |
---|---|
System.String | The character set. |
ClientSideOnCreate
Occurs the action once the Captcha is created.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side captcha creates. |
ClientSideOnRefreshBegin
Occurs when client side captcha refresh begins.
Declaration
public string ClientSideOnRefreshBegin { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side captcha refresh begins. |
ClientSideOnRefreshComplete
Occurs when client side captcha refresh completes.
Declaration
public string ClientSideOnRefreshComplete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side captcha refresh completes. |
ClientSideOnRefreshFailure
Occurs when client side captcha refresh fails to load.
Declaration
public string ClientSideOnRefreshFailure { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side captcha refresh fails to load. |
ClientSideOnRefreshSuccess
Occurs when client side captcha refresh is sucessful.
Declaration
public string ClientSideOnRefreshSuccess { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client side captcha refresh is sucessful. |
CustomErrorMessage
Gets or sets the error message to be displayed when the Captcha mismatch.
Declaration
public string CustomErrorMessage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
|
EnableAudio
Gets or sets the Captcha with audio support, that enables to dictate the captcha text.
Declaration
public bool EnableAudio { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableAutoValidation
Gets or sets the enable auto validation.
Declaration
public bool EnableAutoValidation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableCaseSensitivity
Gets or sets the case sensitivity for the characters typed in the Captcha.
Declaration
public bool EnableCaseSensitivity { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnablePattern
Gets or sets the background appearance for the captcha.
Declaration
[Obsolete("EnablePattern has been deprecated. Use HatchStyle API ")]
public bool EnablePattern { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The Enable Pattern |
EnableRefreshImage
Gets or sets the Captcha with a refresh button.
Declaration
public bool EnableRefreshImage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRTL
Gets or sets the Captcha direction as right to left alignment.
Declaration
public bool EnableRTL { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EncryptedCode
Gets or sets the captcha characters.
Declaration
public string EncryptedCode { get; set; }
Property Value
Type | Description |
---|---|
System.String | The encrypted code. |
ForeColor
Gets or sets the background pattern color.
Declaration
public Color ForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The pattern fore color. |
HatchStyle
Gets or sets the background appearance for the captcha.
Declaration
public HatchStyle HatchStyle { get; set; }
Property Value
Type | Description |
---|---|
HatchStyle | The hatch style |
Height
Gets or sets the height of the Captcha.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The height. |
Locale
Gets or sets the Locale template.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Locale. |
Mapper
Gets or sets the method with values to be mapped in the Captcha.
Declaration
public string Mapper { get; set; }
Property Value
Type | Description |
---|---|
System.String | The mapper |
MaximumLength
Gets or sets the maximum number of characters used in the Captcha.
Declaration
public int MaximumLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The maximum length. |
MinimumLength
Gets or sets the minimum number of characters used in the Captcha.
Declaration
public int MinimumLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The minimum length. |
Model
Gets or sets the Captcha properties to the model.
Declaration
public CaptchaProperties Model { get; set; }
Property Value
Type | Description |
---|---|
CaptchaProperties | The model value. |
PathName
Gets or sets the PathName of the Captcha.
Declaration
public string PathName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The PathName. |
PatternBackColor
Gets or sets the background color for Captcha.
Declaration
public Color PatternBackColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The pattern back color. |
PatternForeColor
Gets or sets the background pattern color.
Declaration
public Color PatternForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | The pattern fore color. |
ShowAudioButton
Gets or sets the Captcha with audio support, that enables to dictate the captcha text.
Declaration
public bool ShowAudioButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowRefreshButton
Gets or sets the Captcha with a refresh button.
Declaration
public bool ShowRefreshButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
TargetButton
Gets or sets the target button of the Captcha to validate the entered text and captcha text.
Declaration
public string TargetButton { get; set; }
Property Value
Type | Description |
---|---|
System.String | The target button. |
TargetInput
Gets or sets the target input element that will verify the Captcha.
Declaration
public string TargetInput { get; set; }
Property Value
Type | Description |
---|---|
System.String | The target input. |
Width
Gets or sets the width of the Captcha.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The width. |
Methods
DependentScripts()
Represents the dependent scripts for Captcha control.
Declaration
public List<string> DependentScripts()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | This method returns the list of dependent scripts file which is of type string |
DesignRender()
Represents the UI Design of Captcha control.
Declaration
public string DesignRender()
Returns
Type | Description |
---|---|
System.String | This method returns the string value |
ExecuteResult()
Declaration
[Obsolete("EnablePattern has been deprecated. Use HatchStyle API ")]
public string ExecuteResult()
Returns
Type | Description |
---|---|
System.String |
Generate(Int32, String, Int32)
Generates Random Text
Declaration
public static string Generate(int maxlength, string captchaChars, int minlength)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxlength | |
System.String | captchaChars | |
System.Int32 | minlength |
Returns
Type | Description |
---|---|
System.String |
GetDependentFiles()
Get the dependent files
Declaration
public override List<string> GetDependentFiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
Overrides
GetModel(Dictionary<Object, Object>)
Gets the Captcha model values
Declaration
public static Captcha GetModel(Dictionary<object, object> model)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Object, System.Object> | model | The model value |
Returns
Type | Description |
---|---|
Captcha | This method returns the captcha object based on the properties given in the model value |
IsValid(String)
Declaration
public bool IsValid(string actualText)
Parameters
Type | Name | Description |
---|---|---|
System.String | actualText |
Returns
Type | Description |
---|---|
System.Boolean |
IsValid(String, Boolean)
Declaration
public bool IsValid(string actualText, bool caseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | actualText | |
System.Boolean | caseSensitive |
Returns
Type | Description |
---|---|
System.Boolean |
IsValid(String, String, Boolean)
Declaration
public bool IsValid(string encryptedCode, string actualText, bool caseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | encryptedCode | |
System.String | actualText | |
System.Boolean | caseSensitive |
Returns
Type | Description |
---|---|
System.Boolean |
LoadViewState(Object)
Declaration
protected override void LoadViewState(object state)
Parameters
Type | Name | Description |
---|---|---|
System.Object | state |
Overrides
OnPreRender(EventArgs)
Modifying server controls before sending them to the client.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Web.UI.HtmlTextWriter | writer |
Overrides
RenderCaptchaImage()
Renders the captcha image
Declaration
[Obsolete("EnablePattern has been deprecated. Use HatchStyle API ", false)]
public string RenderCaptchaImage()
Returns
Type | Description |
---|---|
System.String |
UpdateServerModel(Dictionary<String, Object>)
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | ClientModel |