I have an asp.net application and I’ve realized, that if I set ValidateRequest to false, always a standard error page is displayed.
I’ve heard, that you can display a custom error page.
But I need to know if I can catch the error and display it (after postback) on the current page, that is being displayed.
Is there any way to do this?
I’ve found the following article:
http://blogs.msdn.com/b/kaevans/archive/2003/07/07/9791.aspx
The last point of the article (Overriding the OnError Method), describes how to display an error on the current page.
The
OnErrormethod has to be overwritten and theerror StatusCodehas to be set to 200.