I have an aspx page which dynamically loads user controls via client ajax call (.ajaxRequest(argument)). On one of the user controls in an upload control which needs full postback. I can successfully add client function to kill ajax request from user control for full postback and everything works as expected however once you load another control I get javascript error. I tried ways of removing the function on other pages, well actually the server side event AjaxRequest on aspx page.
As a work around I have to add the OnRequestStart & OnResponseEnd on the aspx page and check which page and only cancel ajax if that page and it works fine but is there a better way?
function Request(sender, args)
{
//alert('Request start initiated by: ' + args.get_eventTarget());
if (args.get_eventTarget() == "ControlsAddTrackControl$btnTrkFleUload")
{
args.set_enableAjax(false);
}
}
Regards