Code Snip "Customizing ScriptManager" to detect errors
Quick code snip that you should add to your script manager if you are using AJAX to catch errors, something pretty frequent when using the ajax library.
aspx.cs:
protected void ScriptManager1_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e)
{
ScriptManager1.AsyncPostBackErrorMessage = e.Exception.Message+e.Exception.StackTrace ;
}
aspx:
<asp:ScriptManager ID="ScriptManager1" runat="server"
OnAsyncPostBackError="ScriptManager1_AsyncPostBackError">
</asp:ScriptManager>
There are many customizations on the ScriptManager.



Comments
Dharma on on 4.24.2008 at 7:19 AM
hi ,
thanks for ur solution, i got head ache with that error,am very greatfull and thankful to u
Regards,
dharma
Monty on on 5.16.2008 at 1:07 AM
After adding that code, it just hid my error. Thought it would detect something?
Musa Bhai on on 7.07.2008 at 4:33 AM
enableEventValidation="False"
Adding this it doesn't make any diff.
My actual problem is in Login window. If the Login or password entered wrong it shows the appr. message and allows to enter again, but entering again and click on login gives this error.
"Sys.WebForms.PageRequestManagerParserErrorException"