The jQuery Forms plugin converts a file upload to an iframe based post rather than an ajax post automatically. (This is because XHR doesn't include files.) So you simply need to create a regular aspx page to handle the response. It can simply be empty except for a load event handler. If you need any response you can push it back in the HTML, which can be read from the body that is passed back.
For example, create a file upload that, on change calls this:
function doSubmit() {
var data = {};
$("#"+formId).ajaxSubmit({success: gotResponse, data: data});
}
Note that "ajaxSubmit" here is a misnomer. In this case (with a file upload) it is actually a regular post that is made to look like an ajax request. Obviously, formId is the id of the form containing the file upload control.
and the response function is, (for example):
function gotResponse(data) {
/* Cut out the extraneous stuff */
result = data.replace(/^.*<div id="infoDiv">/, '')
.replace(/<\/div>.*$/,'');
/* do something with result */
}
Create an aspx page with a div like this:
In the page load for this page do this:
protected void Page_Load(object sender, EventArgs e)
{
try
{
// Get the file and do whatever with it.
var file = Request.Files[0];
// Put the info to send back as a result here
InfoDiv.InnerHtml = "{error: false}"; // Or whatever
}
catch(Exception e)
{
InfoDiv.InnerHtml = "{error: true}"; // Or whatever
}
}
HTH