Hello,
I'm having trouble using the Asp.net validators with Telerik RadAjaxManager. The messages are "duplicated" after ajax requests.
I have an example to explain.
The page has two updateable areas, each area has a textbox and a Asp.net validator, and each textbox triggers an ajax request updating your area.
If you type something in Test 1, its area will be updated, so if you click the submit button, the summary will show twice the message of the field Test 2 (which has not been updated). Each ajax generates another message.
I verified that this only occurs when the validator is inside an updateable area that is not being updated at this time. Also checked that when you are updating an area, the request create (then duplicating) all the validators that are located in other areas, when the validator is not in an updateable area, it is not created in ajax request.
What could I do?
I'm having trouble using the Asp.net validators with Telerik RadAjaxManager. The messages are "duplicated" after ajax requests.
I have an example to explain.
<telerik:RadScriptManager ID="telerik_ajax_manager" runat="server"/><telerik:RadAjaxLoadingPanel ID="ajax_loading_panel" Enabled="true" runat="server" MinDisplayTime="1000" BackColor="#cccccc" Transparency="50"></telerik:RadAjaxLoadingPanel><asp:ValidationSummary ID="validator_summary" runat="server" /><div id="div_test_1" runat="server" style="border-style:solid;border-color:Black;padding:20px;"> Test 1: <asp:TextBox ID="txt_test_1" runat="server" OnTextChanged="txt_test_1_TextChanged" AutoPostBack="true"></asp:TextBox> <asp:Literal ID="ltl_test_1" runat="server"></asp:Literal> <asp:RequiredFieldValidator ID="rfv_test_1" runat="server" ControlToValidate="txt_test_1" Display="None" ErrorMessage="RequiredFieldValidator Test 1"></asp:RequiredFieldValidator></div><br /><div id="div_test_2" runat="server" style="border-style:solid;border-color:Black;padding:20px;"> Test 2: <asp:TextBox ID="txt_test_2" runat="server" OnTextChanged="txt_test_2_TextChanged" AutoPostBack="true"></asp:TextBox> <asp:Literal ID="ltl_test_2" runat="server"></asp:Literal> <asp:RequiredFieldValidator ID="rfv_test_2" runat="server" ControlToValidate="txt_test_2" Display="None" ErrorMessage="RequiredFieldValidator Test 2"></asp:RequiredFieldValidator></div><br /><br /><asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_Click" Text="Submit" /><telerik:RadAjaxManager ID="ajax_manager" runat="server" DefaultLoadingPanelID="ajax_loading_panel"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="txt_test_1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="div_test_1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="txt_test_2"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="div_test_2" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager>protected void Page_Load(object sender, EventArgs e){}protected void btn_submit_Click(object sender, EventArgs e){}protected void txt_test_1_TextChanged(object sender, EventArgs e){ ltl_test_1.Text = txt_test_1.Text; txt_test_1.Text = null;}protected void txt_test_2_TextChanged(object sender, EventArgs e){ ltl_test_2.Text = txt_test_2.Text; txt_test_2.Text = null;}The page has two updateable areas, each area has a textbox and a Asp.net validator, and each textbox triggers an ajax request updating your area.
If you type something in Test 1, its area will be updated, so if you click the submit button, the summary will show twice the message of the field Test 2 (which has not been updated). Each ajax generates another message.
I verified that this only occurs when the validator is inside an updateable area that is not being updated at this time. Also checked that when you are updating an area, the request create (then duplicating) all the validators that are located in other areas, when the validator is not in an updateable area, it is not created in ajax request.
What could I do?