asp.net文件上传消失在回发没有AJAX文件上传、asp、net、AJAX

由网友(沉默代替所有)分享简介:我米使用asp.net 2.0没有Ajax。在FileUpload控件的文件路径被消失,一旦回送取的地方。我做了一些验证在身后code等的控制。我需要重新上载文件作进一步处理。任何一个可以建议我怎么连回发后保持在FileUpload控件的文件路径。 I m using asp.net 2.0 without AJ...

我米使用asp.net 2.0没有Ajax。 在FileUpload控件的文件路径被消失,一旦回送取的地方。我做了一些验证在身后code等的控制。 我需要重新上载文件作进一步处理。任何一个可以建议我怎么连回发后保持在FileUpload控件的文件路径。

I m using asp.net 2.0 without AJAX. The file path in the fileupload control gets vanished once the postback take places. i do some validations for other controls in code behind. i need to upload the file again for further processing. can any one suggest me how to hold the filepath in the fileupload control even after postback.

推荐答案

我同意丝毛。的FileInput控制不能在后期背上持有价值。

I agree with Silky. FileInput control cannot hold value across post backs.

一个可能的解决方法这可能是GMail中如何处理上传附件。 该文件可以被放置在一些临时位置上的服务器和回传后,显示的标签表明该文件已被选中,并提供了一​​个删除按钮。这里的问题是,你必须要考虑清理这些文件。

A possible workaround for this can be how GMail handles uploading attachments. The file can be placed in some temporary location on server and after the post back, display a label indicating that the file is already selected and provide a remove button. A problem here is that you have to consider cleaning up such files.

阅读全文

相关推荐

最新文章