[英]ASP.NET FileUpload control in Ajaxified container
I have a FileUpload
control in a Wizard control. 我在向导控件中有一个FileUpload
控件。 When I click the finish
button, I set a breakpoint and I can see the filepath selected in the FileUpload
control as expected. 单击finish
按钮时,我设置了一个断点,并且可以看到在FileUpload
控件中按预期方式选择的文件路径。
However, when I Ajaxify this same Wizard, the value in the FileUpload
control is always null at this breakpoint, as if a file hasn't been selected. 但是,当我对同一向导进行Ajaxify时, FileUpload
控件中的值在此断点处始终为null,就好像没有选择文件一样。
I know there's a limit where a FileUpload
control can't keep its value after postback, but I have the breakpoint selected on the postback and would still expect to see the value. 我知道有一个限制,即FileUpload
控件在回发后无法保留其值,但是我在回发中选择了断点,并且仍然希望看到该值。
请检查此线程: 在AJAX updatepanel中上传文件而没有完整的回发
You need a full postback to use the FileUpload
control, try adding the FileUpload
control to the PostBackTrigger
section in the UpdatePanel
. 您需要完整的回发才能使用FileUpload
控件,请尝试将FileUpload
控件添加到UpdatePanel
的PostBackTrigger
部分。
See: Problem using the ASP.NET FileUpload control in an UpdatePanel? 请参阅: 在UpdatePanel中使用ASP.NET FileUpload控件时遇到问题?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.