回发后获取文件上载器控件的路径 [英] Getting File Uploader Control path after postback
本文介绍了回发后获取文件上载器控件的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在aspx表单中使用文件上载器控件.在最终提交表单dere之前有一些回发,但是我想要用于最终发回表单的文件路径...我如何获得该文件..请给我们的解决方案..我正在互联网上进行搜索,但针对此问题我没有得到任何适当的解决方案.
谢谢你,
Sriram Nidamanuri
解决方案
您必须使用fileupload控件的PostFile属性.
http://msdn. microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.postedfile%28v=vs.80%29.aspx [
I am using file uploader control in my aspx form .before final submition of form dere is some post backs ,but i want the file path for final post back of form...how can i get that one..please give ur solutions..I am searching in inter net but i did not get any proper solution for this problem.
Thank u ,
Sriram Nidamanuri
解决方案
You have to use PostedFile property of fileupload control.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.postedfile%28v=vs.80%29.aspx[^]
One solution is :-
Take a HiddenField Control and save the file path with HiddenField in 1st post back then you can retrieve the file path from HiddenField after many post back also.
Another solution :- You can take the help of ViewState also.
After Use Update Penal....
<triggers><asp:postbacktrigger controlid="ButtonName" xmlns:asp="#unknown">
这篇关于回发后获取文件上载器控件的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文