
310
|
Chapter 15: The HttpException Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
HelpLink
string = HttpException.HelpLink
HttpException.HelpLink = string
Sets or returns a string containing the URN or URL to a help file containing infor-
mation about the exception.
Parameter
string
A string that will set the HelpLink property or receive the help link from the
property.
Example
The code example will display the help link associated with a custom
HttpException:
Sub Page_Load( )
Try
Dim myHttpEx As _
New HttpException("Threw an exception from Page_Load")
myHttpEx.HelpLink = "file://C:/myHelpDir/myHelpFile.htm"
Throw myHttpEx
Catch HttpEx As HttpException
Message.ForeColor = System.Drawing.Color.Red
Message.Text = "ERROR:<br/>"
Message.Text &= "Message: " & HttpEx.Message & "<br/>"
Message.Text &= "Error Code: " & HttpEx.ErrorCode & "<br/>"
Message.Text &= "Help Link: " & HttpEx.HelpLink & "<br/>"
End Try
End Sub
Notes
The HelpLink is not always set by exceptions thrown from the ASP.NET intrinsic
objects. For example, if you attempt to access the Session intrinsic object when
Session state is disabled, an HttpException will be thrown, but its HelpLink prop-
erty will return an empty string.
InnerException
Exception = HttpException.InnerException
Returns an Exception object containing the inner exception of the HttpException
object.
Parameter ...