I'm using RadAjaxManager to ajaxify some WebForms controls. The ajax works fine in all scenarios except one:
I have a LinkButton:
<asp:LinkButton ID="lnkSaveButton"
Text="Save"
OnClick="lnkSaveButton_Click"
OnClientClick="if ( ! validateValidation()) return false;"
runat="server" />
The validateValidation
function fires some client side page validation on my form controls, which returns false
to block the form from submitting if the Page is invalid.
In the case that the Page is invalid, all of the controls targeted by RadAjaxManager
fail to fire their ajax request on the first click (only) after the validation completes.
Any subsequent click on the ajaxified control fires the request correctly. It's also worth noting that all of the Ajaxified controls work correctly after one ajaxified control has been clicked once. Clicking on any non-ajaxified control (not targeted by RadAjaxManager) has no impact.
It's also worth noting that if I replace RadAjaxManager
with simple RadAjaxPanel
s I get the exact same result as described above.
What is going on and how do I fix it?
ensure you are not adding AjaxSettings that encompass RadAjaxPanel controls
make sure no script errors are thrown, especially by the validation
try calling the ajaxRequsetWithTarget in the client-side handler if validation is successful, something like:
and a sample handler for testing