Hi,
I'm trying to test validation with RadInputManager.
I found an issue with server validation when RadInputManager is added programmatically.
Here the code :
When i add InputManager at the end of the method, it's works fine. (OK comment)
Also if it is added before settings, it's not works. (KO comment)
So, why and is it normal please ?
Regards,
Christophe
I'm trying to test validation with RadInputManager.
I found an issue with server validation when RadInputManager is added programmatically.
Here the code :
<%@ Page Language="VB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
script
runat
=
"server"
>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim InputMgr As RadInputManager = New RadInputManager
InputMgr.ID = "RadInputManager1"
InputMgr.Skin = "Vista"
' KO
'Me.Page.Form.Controls.Add(InputMgr)
dim oTextBoxSetting as TextBoxSetting = new TextBoxSetting
oTextBoxSetting.TargetControls.Add(New TargetInput(TextBox1.UniqueID, True))
oTextBoxSetting.Validation.IsRequired = True
oTextBoxSetting.ErrorMessage = "Text is required !"
InputMgr.InputSettings.Add(oTextBoxSetting)
' OK
Me.Page.Form.Controls.Add(InputMgr)
End Sub
</
script
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
meta
http-equiv
=
"content-type"
content
=
"text/html; charset=utf-8"
/>
<
title
>Test RadInputManager Validation</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
/>
<
asp:Button
ID
=
"btnSubmit"
runat
=
"server"
text
=
"Submit"
/>
<
asp:ValidationSummary
runat
=
"server"
ShowMessageBox
=
"true"
ToolTip
=
"Must type in textbox!"
HeaderText
=
"Header Text"
/>
</
form
>
</
body
>
</
html
>
When i add InputManager at the end of the method, it's works fine. (OK comment)
Also if it is added before settings, it's not works. (KO comment)
So, why and is it normal please ?
Regards,
Christophe