I am trying to upload a file using jquery ajax with handler (c#). The problem is, when I call the handler I get
context.Request.File.Count=0
Your code...
$.ajax({
type: "POST",
url: "Services/UPloader.ashx",
contentType: "application/json; charset=utf-8",
success: OnComplete,
error: OnFail
});
..is missing the data
parameter. The way it's currently written, nothing is being sent to the handler.
You need to pass the file to the handler, using the data
parameter.
Please have a go through this link: http://www.aspdotnet-suresh.com/2015/02/jquery-upload-images-files-without-page-refresh-postaback-in-aspnet.html