J
Jerry J
I am using page level exceptions on some of my WebForms.
In most cases I am handling the errors simply like this:
Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Error
Response.Write(Server.GetLastError().Message)
Server.ClearError()
End Sub
Instead of doing that I would like to send the error info
to a textbox that is on the current form. Somthing like
this:
Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Error
txtErrMsg.text = Server.GetLastError().Message
Server.ClearError()
End Sub
This doesn't work, the page displayed isalways just a
blank white page. Is there a way to do this?
Jerry J
In most cases I am handling the errors simply like this:
Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Error
Response.Write(Server.GetLastError().Message)
Server.ClearError()
End Sub
Instead of doing that I would like to send the error info
to a textbox that is on the current form. Somthing like
this:
Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Error
txtErrMsg.text = Server.GetLastError().Message
Server.ClearError()
End Sub
This doesn't work, the page displayed isalways just a
blank white page. Is there a way to do this?
Jerry J