Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# asp.net多文件上载控件_C#_Asp.net - Fatal编程技术网

C# asp.net多文件上载控件

C# asp.net多文件上载控件,c#,asp.net,C#,Asp.net,我在一个模式弹出窗口上有两个FileUpload控件。第一个fileupload控件可以很好地将文件保存到服务器。但是,第二个fileupload控件与第一个控件完全相同,但当它上载文件时,它被上载为已损坏的0字节。你知道会发生什么吗?我的updatepanel上也有一个触发器,它修复了updatepanel中有上载控件的问题 我的asp和c非常简单 <tr align="center"> <td>Editable Doc</td> <td>

我在一个模式弹出窗口上有两个FileUpload控件。第一个fileupload控件可以很好地将文件保存到服务器。但是,第二个fileupload控件与第一个控件完全相同,但当它上载文件时,它被上载为已损坏的0字节。你知道会发生什么吗?我的updatepanel上也有一个触发器,它修复了updatepanel中有上载控件的问题

我的asp和c非常简单

<tr align="center">
 <td>Editable Doc</td>
  <td>
     <asp:FileUpload ID="uploadeditable" runat="server" />
  </td>
</tr>

与UpdatePanel控件不兼容的控件

以下ASP.NET控件与部分页面更新不兼容,因此在UpdatePanel控件中不受支持:

1. TreeView and Menu controls.

2. Web Parts controls. For more information, see ASP.NET Web Parts Controls.

3. FileUpload controls when they are used to upload files as part of an asynchronous postback.

4. GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.

5. Login, PasswordRecovery, ChangePassword, and CreateUserWizard controls whose contents have not been converted to editable templates.

6. The Substitution control.

7. Validation controls, which includes the BaseCompareValidator, BaseValidator, CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, and ValidationSummary control.

对于您的种类信息,请检查FileUpload1.hasfile,在updatepanel中使用时,它将始终返回false。

两个控件是否有可能具有相同的ID?upload指的是什么?
1. TreeView and Menu controls.

2. Web Parts controls. For more information, see ASP.NET Web Parts Controls.

3. FileUpload controls when they are used to upload files as part of an asynchronous postback.

4. GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.

5. Login, PasswordRecovery, ChangePassword, and CreateUserWizard controls whose contents have not been converted to editable templates.

6. The Substitution control.

7. Validation controls, which includes the BaseCompareValidator, BaseValidator, CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, and ValidationSummary control.