无法设置状态码

I'm using the basic Response.StatusCode to set the status code to 9999. This page is being called via an AJAX call, checking the status code on readyState = 4 and popping an alert on 9999 using the message set by Response.StatusDescription. All I'm getting is readyState = 4 and statusCode = 200. I can provide code if needed, but it's not trim, so I'll trim it down if the code is needed/requested. Any help is appreciated.Coded in C# ASP.NET and Javascript.

UPDATE Purpose: I'm suing the status code 9999 to denote a "User already exists" error when adding a user to an SQL table. This is the only way I can find to let the AJAX call know when this error occurs.

You can't make up status codes. Here are the valid ones

I think the best option is to send back your status and message in a json response.

{
    status: 9999,
    message: "User already exists"
}

Here is a SO post with some links that might educate you on how to do this: Returning JSON object from an ASP.NET page