Hi,
Below in my code in aspx and .cs files
Captcha is working fine when i click on "Submit" button with out clicking "Post Back" button.
If i click on "Post Back" then "Submit", IsValid property returns false.
Could any one please help me.
Thanks,
Sumanth
Below in my code in aspx and .cs files
<
asp:ScriptManager
ID
=
"sm"
runat
=
"server"
>
</
asp:ScriptManager
>
<
asp:UpdatePanel
ID
=
"upTest"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
asp:UpdatePanel
ID
=
"upPostBack"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
asp:Button
ID
=
"btnPostBack"
runat
=
"server"
Text
=
"Post Back"
OnClick
=
"btnPostBack_Click"
/>
<
asp:Label
ID
=
"lblPostBack"
runat
=
"server"
></
asp:Label
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
asp:UpdatePanel
ID
=
"upc"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
<
telerik:RadCaptcha
CssClass
=
"rcPanel"
runat
=
"server"
IgnoreCase
=
"true"
CaptchaImage-UseRandomFont
=
"false"
CaptchaImage-TextChars
=
"LettersAndNumbers"
CaptchaImage-RenderImageOnly
=
"true"
ID
=
"capSignup"
ValidationGroup
=
"valSignup"
ValidatedTextBoxID
=
"txtCaptcha"
ErrorMessage
=
"error"
IsValid
=
"true"
>
</
telerik:RadCaptcha
>
<
asp:TextBox
runat
=
"server"
ID
=
"txtCaptcha"
validateexp
=
"required,errMsg:Enter the above code"
ValidationGroup
=
"valSignup"
></
asp:TextBox
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
asp:Button
ID
=
"btn"
runat
=
"server"
OnClick
=
"btn_Click"
Text
=
"Submit"
ValidationGroup
=
"valSignup"
/>
<
asp:Label
ID
=
"lbl"
runat
=
"server"
></
asp:Label
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
protected
void
btn_Click(
object
sender, EventArgs e)
{
capSignup.Validate();
Page.Validate();
if
(capSignup.IsValid)
lbl.Text=
"Valid"
;
else
lbl.Text =
"In Valid"
;
}
protected
void
btnPostBack_Click(
object
sender, EventArgs e)
{
lblPostBack.Text = DateTime.Now.ToShortTimeString();
}
Captcha is working fine when i click on "Submit" button with out clicking "Post Back" button.
If i click on "Post Back" then "Submit", IsValid property returns false.
Could any one please help me.
Thanks,
Sumanth