Eduardo Lorenzo
12-10-2006, 11:57 PM
ref: http://www.xtremevbtalk.com/showthread.php?t=27719
I like this thread!
I have tried to do this earlier this morning but didn't work. :mad:
i have this in my global.asax
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
Response.Redirect("../administration/errorpage.aspx")
End Sub
and this fired on the page_load event of errorpage.aspx
Private Sub displayerror()
Dim errmsg As String
Try
errmsg = Server.GetLastError.Message
lbl_Error.Text = errmsg
Catch ex As Exception
lbl_Error.Text = ex.Message
End Try
End Sub
but after
errmsg = Server.GetLastError.Message
errmsg is still = Nothing :mad:
anyone? please?
oh, and I have
<customErrors mode="RemoteOnly"/>
in web.config..
I like this thread!
I have tried to do this earlier this morning but didn't work. :mad:
i have this in my global.asax
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
Response.Redirect("../administration/errorpage.aspx")
End Sub
and this fired on the page_load event of errorpage.aspx
Private Sub displayerror()
Dim errmsg As String
Try
errmsg = Server.GetLastError.Message
lbl_Error.Text = errmsg
Catch ex As Exception
lbl_Error.Text = ex.Message
End Try
End Sub
but after
errmsg = Server.GetLastError.Message
errmsg is still = Nothing :mad:
anyone? please?
oh, and I have
<customErrors mode="RemoteOnly"/>
in web.config..