如何在图像控件中添加图像? [英] How can I add a Image in Image Control?
问题描述
大家好,
我正在c:\ temp文件夹\中生成报告和1个jpeg文件.
然后,我试图从同一路径在Image Control中显示此图像.
目前,我使用imageurl属性,例如:
imgChart.ImageUrl ="C:/temp文件夹/File1.jpeg";
但无法在图像控件中查看.
请帮忙.
提前谢谢.
Swati
Hello All,
I am generating report and 1 jpeg file in my c:\temp folder\.
Then I am trying to display this image in Image Control from the same path.
Currently I using imageurl property like:
imgChart.ImageUrl = "C:/temp folder/File1.jpeg";
but not able to view the same in image control.
Please help.
Thanks in advance.
Swati
推荐答案
尝试一下
复制路径
"C:/temp文件夹/File1.jpeg";
并将其粘贴到Internet Explorer
如果图像打开,则表示您已输入正确的路径
如果不是,请检查路径中的转义序列
希望对您有帮助.
问候:rolleyes:
Try this
Copy your path
"C:/temp folder/File1.jpeg";
and paste it in internet explorer
if image opens that means you have put the correct path
if not , check your escape sequences in the path
Hope this will help you.
Regards :rolleyes:
imgChart.ImageUrl ="C:/temp文件夹/File1 .jpeg;
imgChart.ImageUrl = "C:/temp folder/File1.jpeg";
您的路径不应该使用反斜杠而不是正斜杠吗?
Shouldn''t your path be using back-slashes instead of forward-slashes?
<br />
imgChart.ImageUrl = @"C:\temp folder\File1.jpeg";
克里斯.
Chris.
这篇关于如何在图像控件中添加图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!