I am using kendo upload control to post file to server
@(Html.Kendo().Upload()
.Name("file")
.Async(a => a.Save("DocumentUpload", "Home")
.AutoUpload(true))
.Multiple(false))
[HttpPost]
public ActionResult DocumentUpload(IEnumerable<HttpPostedFileBase> files)
{
var isAjax = HttpContext.Request.IsAjaxRequest();
// Why isAjax is false here ?? Is it not Ajax POST?
}
I thought kendo makes ajax POST request.
However this is not true, in asp.net HttpContext.Request.IsAjaxRequest()
returns false
.
When i check request headers i dont see X-Requested-With:XMLHttpRequest
header as well.
Is this a bug in kendo upload?
Is there anyway to configure kendo upload control to make ajax POST?