I have an MVC project in which I have a form with a submit button. I have added a jquery client-side handler that intercepts the form submit event. The javascript function
Does CreateItem perform redirect? See Firefox does not preserve custom headers during Ajax request redirect: an ASP.NET MVC solution
The Request.IsAjaxRequest
property should reflect the existence of the X-Requested-With
HTTP header. Is this header actually sent to the server? As James suggests, try to profile this with Fiddler or similar proxy server alternatives.
Well... I apologize. I don't know what has changed, but now IsAjaxRequest is returning true. I compare the code I posted above and what is executing now and I see no difference. I repeatedly got false on this before, and now I repeatedly get true. Surely I am missing something, but I don't see it.
I'm not sure what the difference would be but a possible way to identify if there is one is to use an HTTP profiling tool like Fiddler (www.fiddlertool.com) and look for possible differences between the two calls.