引用:http://www.cnblogs.com/lyeo/archive/2012/05/11/2496261.htmlhtml
直接上代碼: ajax
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都傳遞就:
json
var data ={}; $("#"+ formId +" :input").each(function(){data[this.name]=this.value});
後臺代碼:直接 Request["參數名"]就能取值
this
引用自:http://stackoverflow.com/questions/4797523/ajaxfileupload-have-more-params-than-fileurl