G
Guest
Hi!
I want to set up an exception handler in my asp.net page which handles all
unhandled exception. When the exception is trapped I want to assign its
message to a label. How can I do this?
I have tryied to do like this:
Protected Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Error
Label.text = Server.GetLastError().Message()
Server.ClearError()
End Sub
The exception is trapped but I got a blank page. Why is that? Is it
possible to do what i´m trying to do?
I want to set up an exception handler in my asp.net page which handles all
unhandled exception. When the exception is trapped I want to assign its
message to a label. How can I do this?
I have tryied to do like this:
Protected Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Error
Label.text = Server.GetLastError().Message()
Server.ClearError()
End Sub
The exception is trapped but I got a blank page. Why is that? Is it
possible to do what i´m trying to do?