如何在图像控件中添加图像? [英] How can I add a Image in Image Control?

查看:119
本文介绍了如何在图像控件中添加图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在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:


Swati_g1985写道:
Swati_g1985 wrote:

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屋!

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