Showing posts with label handler. Show all posts
Showing posts with label handler. Show all posts

Wednesday, March 28, 2012

PageError event of scriptmanager not firing

I have a content page that has a master page. I have an updatepanel and a scriptmanger in my content page. I defined a handler for OnPageError for the scriptmanager and defined a error template for the scriptmanager but when I set the e.errormessage in the OnPageError event, but if I set a break point in the event, the break point is never reached and the error message in the template still displays 'unknown error' Any ideas?

if I put a button on the page and in the click event of the button i manually throw and error.

thrownewException("error button clicked");

the event fires and works fine.

but if I put some invalid characters like '<img src' inside a textbox and then click the button (removing the throw) then the OnPageError isn't fired

Monday, March 26, 2012

PageRequestManager endRequest event not always firing

Hi,

I am using the ModalUpdateProgress control (http://www.codeproject.com/Ajax/ModalUpdateProgress.asp) and this hooks up an event handler to the PageRequestManager endRequest event but this is not always getting fired in Opera and Firefox. I can repro the problem in Opera but not FF (one user has reported this in FF).

I have posted a message to the forum for this control but thought that it might be a wider problem related to ASP.NET AJAX.

Any ideas?

Thanks,

Jason

Hi,Jason

Have you tested the PageRequestManager endRequest event without ModalUpdateProgress control?

If the PageRequestManager endRequest event always firing in other cases(I mean without PageRequestManager),The issue can be only a ModalUpdateProgress issue rather than an AJAX issue~

Thanks


Hi,

I tested hooking into the endRequest event manually (without the ModalUpdateProgress control) and it still doesn't get fired on this one page using Opera. It seems to work on all other pages though:

function pageLoad()
{
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest);
}
function endRequest(sender, arg)
{
alert("here");
}

So, it does appear to be an issue with ajax rather than just the ModalUpdateProgress.

Any suggestions as to how I can debug this further?

Thanks,

Jason


OK...after discovering the error console in the Opera browser, I was able to determine that the problem is being caused by sliders within a modalpopup. These are generating a JS error that has a ripple on effect that breaks my pageLoad scripts, thereby preventing the endRequest from getting called. I have logged a bug report in codeplex for the sliders and will put protective code in my pageLoad scripts so that they don't error.