图片无法显示
图片显示红X[code=C#][/code]<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="huiyuan_Default" %>
<%@ Register TagPrefix="ascx" TagName="ChkLogin" Src="~/ascx/ChkLogin.ascx" %>
<html>
<head id="Head1" runat="server">
<title>管理后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="images/css.css" type="text/css" rel="stylesheet">
<style type="text/css">
body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<ascx:ChkLogin ID="chk" runat="server" />
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tbody>
<tr>
<td align="middle">
<link href="images/css.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!
-- body
{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
}
#Layer1
{
position: absolute;
left: 390px;
top: 22px;
width: 27px;
height: 80px;
z-index: 1;
}
-- ></style>
<script src="js/supersleight.js" type="text/javascript"></script>
<table height="100" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td style="background-position: 50% bottom; background-repeat: repeat-x" valign="top"
background="images/TopBack.jpg" bgcolor="#3f87d3">
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="388"><img height="140" src="images/Logo.jpg" width="388"></td>
<td align="left">
<table width="100%" height="140" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="right" valign="top"><img src="images/top_01.jpg"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="middle">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="175">
<iframe src="mainleft.aspx" id="Iframe1" frameborder="0" width="175" height="600" allowtransparency>
</iframe>
</td>
<td width="19" bgcolor="#ffffff">
</td>
<td valign="top" align="middle" width="100%" height="600" style="background-color:#ffffff;">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top">
<iframe id="mainFrame" name="mainFrame" src="newslist.aspx?classid=1" frameborder="0" width="100%"
height="560" allowtransparency></iframe>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table height="31" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top" width="30%" background="images/FooterBack.jpg">
<img src="images/MenuFooter.jpg">
</td>
<td valign="bottom" width="70%" background="images/FooterBack.jpg">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<style type="text/css">
.STYLE2
{
color: #FFFFFF;
cursor: pointer;
margin-top: 4px;
font-size: 13px;
}
</style>
</form>
</body>
</html>
[解决办法]
要么写法不对,要么路径不对
[解决办法]
图片路径不对吧,是不是同目录的,如果是上级目录还得再前面加../images/xxxx
[解决办法]
路径,权限,图片格式都可以导致不能显示
[解决办法]
jpg必须是RGB模式,不能说CYMK模式,可以使用Photoshop打开开一下
权限问题的解决方法
<configuration>
<location path="允许匿名访问的文件夹名称或者文件路径">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>