不会显示我有一个虚拟目录我的iis -portal,其中包含的图像。我把我的asp.net形式的图像标签。图片上的Visual Studio设计时
<img src="http://localhost/portal/images/button_right.gif" alt="Alternate Text" />
这是代码:
<%Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication15.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<img src="http://localhost/portal/images/button_right.gif" alt="Alternate Text" />
</div>
</form>
</body>
</html>
的图片显示,当我运行该项目,在浏览器上。 图像不显示在设计时间。 - 我看到X,而不是图像。 我设置了虚拟目录下的所有读取写入执行权限。
我试过你的问题,它在我的电脑上工作正常。虚拟目录img指向e:\ img,img src = http://localhost/img/1.png在vs设计器中显示?你有没有尝试在浏览器中调用src路径 - 只是为了检查设置正确的东西? –