直接上代码:
var data = { name: 'my name', description: 'short description' } $.ajaxFileUpload({ url: '/File/Upload', secureuri: false, data: data, fileElementId: 'fileToUpload', dataType: 'json', success: function (data) { alert(data.msg); }, error: function (data) { alert("error"); } });
传递一个data包,如果要把所有的input都传递就:
var data ={}; $("#"+ formId +" :input").each(function(){data[this.name]=this.value});
后台代码:直接 Request["参数名"]就能取值
引用自:http://stackoverflow.com/questions/4797523/ajaxfileupload-have-more-params-than-file