2012-11-20 4 views
1

두 개의 FileUpload 컨트롤이 모달 팝업에 있습니다. 첫 번째 파일 업로드 컨트롤은 파일을 서버에 저장하는 데 적합합니다. 그러나 두 번째 파일 업로드 컨트롤은 첫 번째 파일 업로드 컨트롤과 완전히 동일하지만 파일 업로드시 0 바이트로 손상된 것으로 업로드됩니다. 무슨 일이 일어날 수 있니? 또한 updatepanel 내부에 업로드 컨트롤이있는 문제를 해결하는 트리거가 있습니다. asp.net 여러 파일 업로드 제어

내 ASP와 C#을

다음 ASP.NET 컨트롤이 아닌 여기

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

이 UpdatePanel와 호환되지 않습니다

upload.PostedFile.SaveAs(path + "\\" + file); 
+0

우연히 두 컨트롤의 ID가 같습니까? – Yahia

+0

아니요. – user541597

+0

'upload'는 무엇을 나타 냅니까? – Darren

답변

0

컨트롤 뒤에 코드 제어 매우 간단합니다 부분 페이지 업데이트와 호환되므로 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가 반환됩니다.