如何在文件上传控件中检索图像的名称和路径 [英] how to retrieve name and path of image in file upload control

查看:64
本文介绍了如何在文件上传控件中检索图像的名称和路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有更新产品的表格,我有文件上传控件,在更新产品表格中我已经在产品名称,价格等相应的文本框中检索了产品的所有其他详细信息。我还想在使用添加产品表单上传的文件上传控件中检索产品图像的名称和路径。是否可以将上传文件的路径设置为文件上传控件。

I have form for update product in which I have file upload control, in update product form i have retrieved all other details of product in appropriate text boxes like product name,price,etc. I also want to retrieve name and path of product image in file upload control which is uploaded using add product form. Is it possible to set path of uploaded file to file upload control.

推荐答案

由于安全限制,这是不可能的。用户进行选择时, FileUpload 设置路径。



替代解决方案是使用标签控制显示文件路径而不是文件上传控制。
This is not possible due to security restrictions. FileUpload is set with the path when user make a selection.

Alternate solution is make use of lable control to display file path rather than file upload control.


这篇关于如何在文件上传控件中检索图像的名称和路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆