发布后未显示图像 [英] Images not displayed after publishing

查看:83
本文介绍了发布后未显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我们在根文件夹中有一个母版页,几乎没有图像,在子文件夹中有一个aspx页(使用根母版页).当我们在VS2010中运行该解决方案时,所有图像都可以正常运行.

但是,当我将解决方案发布到IIS时,母版页上的图像未显示.有什么建议吗?

Hello,

We have a master page in root folder with few Images and a aspx page (using the root master page) in a subfolder. All images are coming fine when we run the solution in VS2010.

However when I publish the solution to IIS, the Images on the master page are not displaying. Any suggestions?

推荐答案

我猜是相对路径问题.

要解决此参考问题,请使用ResolveURL
I guess its Relative Path Issue.

To Fix this Reference your Image using ResolveURL
<img src="<%=ResolveUrl("~/images/nav_01.gif")%>">


这篇关于发布后未显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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