Context.IsCustomErrorEnabled
<%@ Page Language="vb" %> <html> <head> <script runat="server"> Sub Page_Load() Message.Text = "Custom Error Enabled? " & Context.IsCustomErrorEnabled End Sub </script> </head> <body> <asp:label id="Message" runat="server"/> </body> </html>