本文介绍了如何在c#中找到我的项目文件夹中的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨Guyz,
我很难在图像对象中显示我的图像..
i将我的图像保存在一个文件夹中,这是我保存图像的路径。
C:\ Users \Documents \ Visual Studio 2010 \Projects\ProjectItems \ProjectItems \CopponLogo
实际上文件夹在我的项目中c#
i在asp.net中有一个图像对象,但是当我找到图片的路径时它不起作用
继承人我的代码:
string startupPath = AppDomain.CurrentDomain.BaseDirectory;
string targetPath = startupPath + CouponLogo \\ \\\跨度>;
imgLogo.ImageUrl = startupPath + smile.png
提前感谢..
解决方案
Hi Guyz,
I'm having a hard time for displaying my images in a image object..
i saved my images in in a folder, heres the path where im saving my images.
C:\Users\Documents\Visual Studio 2010\Projects\ProjectItems\ProjectItems\CouponLogo
actually the folder was inside my project in c#
i have a image object in asp.net, but when i locate the path of picture it doesnt work
heres my code:
string startupPath = AppDomain.CurrentDomain.BaseDirectory; string targetPath = startupPath + "CouponLogo\\"; imgLogo.ImageUrl = startupPath + smile.png
thanks in advance..
解决方案
这篇关于如何在c#中找到我的项目文件夹中的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!