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
Community Blogs said on 4.04.2007 at 12:02 AM
On the ArcGIS server development blog you’ll find a much waited post; how to use ASP.NET AJAX and
DotNetKicks.com said on 4.10.2007 at 11:04 PM
You've been kicked (a good thing) - Trackback from DotNetKicks.com
Community Blogs said on 4.27.2007 at 12:05 AM
Most annoying issue with MS ASP.NET 2.0 Ajax 1.0 is the error Sys.WebForms.PageRequestManagerParserErrorException
Community Blogs said on 4.23.2008 at 2:46 AM
Last year I wrote a fix for AJAX 1.0 on my old blog, looks like many people found it helpful, I wanted
Dharma said 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 said on 5.16.2008 at 1:07 AM
After adding that code, it just hid my error. Thought it would detect something?
Musa Bhai said 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"