I figured it out thought I might as well post the answer for others.

In .net 1.1 you can use the Response.StatusCode to set it to a bad status
(500), and response.write to send text.

This will cause jQuery to call the error callback, and from there you can
use xhr.responseText to read any text from Response.Write


seedy wrote:
> 
> So I have jQuery talking to some asp.net 1.1 pages through $.ajax.  
> There are some situations on the server side(session timeout, access
> denied) where I would like to 'cause' an error.  
> I could write 'error' to the html and check for it in the success:
> function, it would just make more sense to me if all errors were in the
> error: callback.
> 
> So the question is what can I do from my .net code to cause jquery $.ajax
> to run the error callback?
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ajax-%27error%27-tf4379022s15494.html#a12485288
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to