日期:2014-05-16 浏览次数:20704 次
<script type="text/javascript"> function upload() { var options = { type: 'POST', url: 'Handler.ashx?companyid=' + $("#HidCompanyid").val(), //只需要向一般处理程序中传参数 success: function (msg) { }//不需要任何操作 }; $('#upform').ajaxSubmit(options); return false; } </script> </head> <body> <form id="upform"enctype="multipart/form-data"> <input name="File" id="File" type="file" class="text" size="40" onchange="upload()" /> <input id="HidCompanyid" type="hidden" value="21" /> </form> </body> --Handler.ashx HttpFileCollection imgs = context.Request.Files; int icount=imgs.count//这个地方始终为0,