Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error/Status codes in code behind the page
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01008575
Message ID:
01008583
Views:
15
I am not sure if this answers your question, but here is a link I found that talks about status codes:

HTTP Status Codes

I found something about them in the book Programming ASP.NET by Jesse Liberty with regard to Tracing. If you set Trace=True in the Properties page for a .aspx page, you can see the Status Code and other trace information at the bottom of the page.

You can also get the Status Code in your code by using Response.StatusCode(), which is of type Integer.
   Dim myStatusCode As Integer = Response.StatusCode()
>To all,
>
>I've spent a couple of hours trying to figure out how to get error status codes . I've got a book that gives the cryptic (and utterly useless) statement:
>
>"[Error status] codes are exposed by the HTTPStatusCode property of the System.Net namespace."
>
>It then lists a half-dozen codes and a non-existant URL for "an excellent discussion of status codes".
>
>Hunting around in the .NET help and web site just pi$$ed me off even more.
>
>So, could anyone give me a code snippet that shows HOW you get the error codes from the HTTPStatusCode property?
>
>Regards,
>Thom C.
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform