It seems like by default, Asp.net does not recognize Ext JS getForm().submit() calls as an ajax request. This is causing an issue for me because I am trying to return a JsonResult instead of a view if the request was made via Ajax.
However, when the following gets called
this.getForm().submit({
url: url,
waitMsg: 'Saving Request Details',
scope: this,
success: function (form, o) {
...
},
failure: function (form, o) {
...
}
});
inside of my Asp.net MVC action that gets called, HttpContext.Request.IsAjaxRequest() is returning false.
How can I make it so Asp.Net correctly recognizes the request as an ajax request?
Yuo can alway add hidden parameter in you form what will determ that this request is via AJAX
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With