Class CaptchaControl
The CaptchaControl control provides a Captcha Challenge control.
Inheritance
Implements
Namespace: DotNetNuke.UI.WebControls
Assembly: DotNetNuke.dll
Syntax
public class CaptchaControl : WebControl
Constructors
| Improve this Doc View SourceCaptchaControl()
Initializes a new instance of the CaptchaControl class.
Declaration
public CaptchaControl()
Properties
| Improve this Doc View SourceBackGroundColor
Gets or sets the BackGroundColor.
Declaration
public Color BackGroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
BackGroundImage
Gets or sets the BackGround Image.
Declaration
public string BackGroundImage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CaptchaChars
Gets or sets the list of characters.
Declaration
public string CaptchaChars { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CaptchaHeight
Gets or sets the height of the Captcha image.
Declaration
public Unit CaptchaHeight { get; set; }
Property Value
Type | Description |
---|---|
Unit |
CaptchaLength
Gets or sets the length of the Captcha string.
Declaration
public int CaptchaLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CaptchaWidth
Gets or sets the width of the Captcha image.
Declaration
public Unit CaptchaWidth { get; set; }
Property Value
Type | Description |
---|---|
Unit |
EnableViewState
Gets or sets a value indicating whether the Viewstate is enabled.
Declaration
public override bool EnableViewState { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ErrorMessage
Gets or sets the ErrorMessage to display if the control is invalid.
Declaration
public string ErrorMessage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ErrorStyle
Gets and sets the BackGroundColor.
Declaration
public Style ErrorStyle { get; }
Property Value
Type | Description |
---|---|
Style |
Expiration
Gets or sets the Expiration time in seconds.
Declaration
public int Expiration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsValid
Gets a value indicating whether the control is valid.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RenderUrl
Gets or sets the Url to use to render the control.
Declaration
public string RenderUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Text
Gets or sets the Help Text to use.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TextBoxStyle
Gets the Style to use for the Text Box.
Declaration
public Style TextBoxStyle { get; }
Property Value
Type | Description |
---|---|
Style |
Methods
| Improve this Doc View SourceCreateChildControls()
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected override void CreateChildControls()
GetNextCaptcha()
Gets the next Captcha.
Declaration
protected virtual string GetNextCaptcha()
Returns
Type | Description |
---|---|
System.String | The challenge string. |
LoadPostData(String, NameValueCollection)
LoadPostData loads the Post Back Data and determines whether the value has change.
Declaration
public virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters
Type | Name | Description |
---|---|---|
System.String | postDataKey | A key to the PostBack Data to load. |
NameValueCollection | postCollection | A name value collection of postback data. |
Returns
Type | Description |
---|---|
System.Boolean | Always false. |
LoadViewState(Object)
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected override void LoadViewState(object savedState)
Parameters
Type | Name | Description |
---|---|---|
System.Object | savedState |
OnPreRender(EventArgs)
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
EventArgs | e |
OnUserValidated(ServerValidateEventArgs)
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected virtual void OnUserValidated(ServerValidateEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
ServerValidateEventArgs | e |
RaisePostDataChangedEvent()
RaisePostDataChangedEvent runs when the PostBackData has changed.
Declaration
public void RaisePostDataChangedEvent()
Render(HtmlTextWriter)
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
HtmlTextWriter | writer |
SaveViewState()
The CaptchaControl control provides a Captcha Challenge control.
Declaration
protected override object SaveViewState()
Returns
Type | Description |
---|---|
System.Object |
Validate(String)
Validates the posted back data.
Declaration
public bool Validate(string userData)
Parameters
Type | Name | Description |
---|---|---|
System.String | userData | The user entered data. |
Returns
Type | Description |
---|---|
System.Boolean | true if the data is valid, otherwise false. |
Events
| Improve this Doc View SourceUserValidated
The CaptchaControl control provides a Captcha Challenge control.
Declaration
public event ServerValidateEventHandler UserValidated
Event Type
Type | Description |
---|---|
ServerValidateEventHandler |