HttpParseException Class
The exception that is thrown when a parse error occurs.
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::Exception
System::SystemException
System.Runtime.InteropServices::ExternalException
System.Web::HttpException
System.Web::HttpParseException
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.