提供imageurl时图像控件不显示图像 [英] image control not displaying image when giving imageurl

查看:84
本文介绍了提供imageurl时图像控件不显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...
我尝试像这样加载时加载图像
Image1.ImageUrl ="domain.com/httpdocs/admin/zestimg.jpg";
在浏览器中观看时,它会返回异常,例如
找不到404文件,但我在那里上传了图像,并具有读和写权限,我也尝试了许多方法,例如Server.MapPath(〜/admin/zestimg.jpg");并且也以这种方式Server.MapPath("../admin/zestimg.jpg");每次firebug软件显示未找到此异常文件时,我如何将图像地址提供给图像控件,请任何人可以帮助我
预先感谢

hi all...
i am try to load image when loading like this
Image1.ImageUrl="domain.com/httpdocs/admin/zestimg.jpg";
while watching in browser it returns exception like
404 file not found but image is there i uploaded as well as given read & write permissions also i tried in many ways like Server.MapPath("~/admin/zestimg.jpg"); and also in this way Server.MapPath("../admin/zestimg.jpg"); every time firebug software shows this exception file not found how can i give image address to image control please can any one help me Greatly Appreciate You
thanks in advance

推荐答案

它看起来像不是有效的URL.它应该是"http://domain.com/whatever-the-path-is/zestimg.jpg"或文件名相对于使用该文件的页面.

同样,您似乎尝试从服务计算机上的文件路径名跟踪路径名. URL路径不是以这种方式构建的.在域名之后,应该有一个相对于您站点根目录的目录.从某些Web浏览器之类的地址中查看您站点的URL(已经工作的URL).您将看到"httpdocs"从不出现.网站的根目录之外的所有目录对于网站用户完全不可见.

—SA
It does not look like a valid URL. It should be either "http://domain.com/whatever-the-path-is/zestimg.jpg" or a file name relative the the page where it is used.

Also, it looks like you try to track you path name from the file path name on your service computer. URL paths are not built this way. After domain name a directory relative to the root path of your site should go. Look at the URLs of your site (those which already work) from the address like of some Web browser. You will see that "httpdocs" never appears. All the directories outside of the root directory of your site are completely invisible to the Web site user.

—SA


这篇关于提供imageurl时图像控件不显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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