When it comes to setting the status code to 9999, I am utilizing the basic Response.StatusCode
. In this case, the page is accessed via an AJAX call and the status code is checked at readyState = 4
. On detecting 9999 as the status code, an alert pops up with the message specified by Response.StatusDescription
. However, despite my efforts, all I see is readyState = 4
and statusCode = 200
. I can share code snippets if required, though I may need to trim them down. Any assistance in this regard would be greatly appreciated. Coded in C# ASP.NET and Javascript.
UPDATE Purpose: The reason behind using the status code 9999 is to indicate an "User already exists" error while attempting to add a user to an SQL table. This is currently the only method through which the AJAX call can detect the occurrence of such an error.