Trying to learn how to do exception handling in .net c#. I wanted to just raise an error to the page but get the error below when I try this statement. Can anyone tell me why? How can I simply display the error (preferrably in a message box) on a web form?
catch (Exception ex)
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.