显示文件夹中的图像

显示文件夹中的图像

本文介绍了显示文件夹中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想从我的项目中未包含的文件夹中的图像控件中显示图像.我怎样才能做到这一点?我正在提供我正在使用的代码,但它不起作用...请指导该代码出了什么问题..请记住,文件夹(Uploads)未包含在我的项目文件中,并且我不想包含该文件夹还有...

Hi,
I want to display an image in my image control from a folder that is not included in my project. how can i do that? I am giving the code i am using but it is not working...Pleas guide what is wrong with that code..Remember that folder(Uploads) is not included in my project file and I don''t want to include that folder as well...

string path = Server.MapPath("~/Uploads/Chrysanthemum_3.jpeg");
imgPicture.ImageUrl = path;

推荐答案

string path = Server.MapPath("~") + "/Uploads/Chrysanthemum_3.jpeg"; <br />
imgPicture.ImageUrl = path;


这篇关于显示文件夹中的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 14:00