页面往返时如何在文件上传器中保存图像路径(刷新) [英] how can i hold the image path in file up-loader when page take round trip(refresh)
本文介绍了页面往返时如何在文件上传器中保存图像路径(刷新)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请为此提供可用的解决方案
Thanks
Please provide usable solution for this
thanks
推荐答案
选择文件后,回发时,PostedFile
属性将使用文件的HttpPostedFile
对象进行初始化.因为,HTTP请求是无状态的,并且PostFile是使用HttpPostedFile对象初始化的-它会释放其状态.
如果需要,请在这里查看如何保留它:如何在回发后保持FileUpload控件的状态 [
When a file is selected, on postbackPostedFile
property gets initialized withHttpPostedFile
object for the file. Since, HTTP Request are stateless and PostedFile is initialized with HttpPostedFile Object - it loose it''s state.
Have a look here on how to retain it if you want: How to Maintain FileUpload Control’s State after PostBack[^]
BTW: You should have tagged it as ASP.NET
这篇关于页面往返时如何在文件上传器中保存图像路径(刷新)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文