HttpParseException Class
.NET Framework 3.0
The exception that is thrown when a parse error occurs.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The HttpParseException class is an HTTP-specific exception class that enables ASP.NET to output parser exception information. For more information on throwing and handling exceptions, see Handling and Throwing Exceptions.
The following example demonstrates how to use the HttpParseException to customize errors generated during page parsing. In this example, a customized HtmlSelect control is defined. If child elements of the custom control are not of a specified type then an HttpParseException is thrown in the overridden GetChildControlType method of a custom HtmlSelectBuilder. To generate a parse exception, change the child element literal MyCustomOption to any other string.
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
System.Object
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Web.HttpException
System.Web.HttpParseException
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Web.HttpException
System.Web.HttpParseException
Community Additions
ADD
Show: