Name
HelpLink
Synopsis
string = HttpException.HelpLink HttpException.HelpLink = string
Sets or returns a string containing the URN or URL to a help file containing information about the exception.
Parameters
-
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 property will return an empty string.
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.