I'm using the JQuery Form plugin to do a file upload on an ASP.NET MVC application. I've learned that since an iframe is used for file uploads (rather than XMLHttpRequest, which isn't possible), the server-side check for IsAjaxRequest fails.
I've seen a few posts related to this question but haven't come across any good solutions to work around this issue. As with the rest of my application, I'd like to be able to support both JavaScript enabled and JavaScript disabled scenarios, which is why I'd like to detect whether a request is ajax or not.
I realize that the iframe approach being used is not technically ajax, but I'm trying to mimic an ajax effect.
Any suggestions would be welcome.
以上就是Detecting IsAjaxRequest() with ASP.NET MVC and JQuery Form Plugin / File Upload的详细内容,更多请关注web前端其它相关文章!