直接上代码: 

    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

相关文章:

  • 2022-12-23
  • 2018-01-12
  • 2022-12-23
  • 2021-09-21
  • 2021-12-16
  • 2021-11-28
  • 2022-03-06
猜你喜欢
  • 2021-06-04
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-12-01
相关资源
相似解决方案