[英]Image can load when running by IIS Express on Visual studio, but can't load when running by IIS
在C:\\WebApplication1\\WebApplication1
創建 Web 應用程序項目,如下所示。
文件Test/index.aspx
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>index page</h1>
<img src="../images/myimage1.png" />
</div>
</form>
</body>
</html>
在 Visual Studio 上通過 IIS Express 運行時可以加載圖像,如下所示。
Test/index.aspx
,如下所示。
http://localhost/WebApplication1/images/myimage1.png
打開圖像,如下所示。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.