Hi,
I would like to set EnableAjax to false on the AjaxManager but only when the request is triggered via the OnAjaxRequest property and not when every other Ajax request is called.
Example in the documentation states I can force a postback via:
This works fine but it will of course stop all my Ajax requests will it not?
I was hoping I could do:
or
but neither seem to work. The former because the event does not exist and the latter because it is too late in the page lifecycle to set enable ajax to false. Any ideas how I achieve this please?
I would like to set EnableAjax to false on the AjaxManager but only when the request is triggered via the OnAjaxRequest property and not when every other Ajax request is called.
Example in the documentation states I can force a postback via:
| function onRequestStart(sender, args) { |
| args.set_enableAjax(false); |
| }; |
This works fine but it will of course stop all my Ajax requests will it not?
I was hoping I could do:
| function ajaxRequest() { |
| var ajaxManager = $find("<%= ajaxManager.ClientID %>"); |
| ajaxManager.set_enableAjax(false); |
| } |
or
| protected void ajaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| ajaxManager.EnableAJAX = false; |
| // then call server side code |
| } |
but neither seem to work. The former because the event does not exist and the latter because it is too late in the page lifecycle to set enable ajax to false. Any ideas how I achieve this please?