asp.net.ph

HttpException Constructor

System.Web Namespace   HttpException Class


Constructs a new Exception object.

Overload List

1. Constructs an empty Exception object.

2. Constructs an Exception using a supplied error message.

3. Constructs an Exception using an HTTP error code and an error message.

4. Constructs an Exception using an error message and the InnerException property.

5. Constructs an Exception using error message and an exception code.

6. Constructs an Exception using an HTTP error code, an error message, and the InnerException property.

7. Constructs an Exception using HTTP error code, an error message, and an exception code.


Example

The following example throws an exception if a user-entered value is 0.

NOTE: This example shows how to use one of the overloaded versions of the HttpException constructor. For other examples that might be available, see the individual overload topics.

[ VB ]
If Num = 0 Then
   Throw New HttpException ( "No value entered", 100 ) 
end if


[ C# ]
if ( Num == 0 ) {
   throw new HttpException ( "No value entered", 100 );
}
See Also

HttpException Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph