June 2002
Intermediate to advanced
816 pages
28h 12m
English
Error
Exception = Context.Error
Returns the first error, if any, associated with the current request.
Exception
An Exception variable to receive the value of the property.
The example checks to see if the Error property on the current
context object is null (Nothing in VB.NET). If it
is not null, it displays the error; otherwise, it displays a message
indicating there is no error.
Sub Page_Load( )
If Not HttpContext.Current.Error Is Nothing then
Message.Text = HttpContext.Current.Error.ToString( )
Else
Message.Text = "No error detected"
End If
End SubRead now
Unlock full access