<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="admin_index" %><%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<%@ Register Src="buttom.ascx" TagName="buttom" TagPrefix="uc2" %><!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">
<LINK href="shopcss.css" type ="text/css" rel ="stylesheet">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div><uc1:top ID="Top1" runat="server" />
<%-- <uc1:top ID="Top1" runat="server" OnLoad="Top1_Load" />--%>
<table height ="31" cellpadding="0" cellspacing="0" width="778" border="0">
<tr>
<td height ="15"></td>
</tr>
<tr>
<td background="../bg.jpg" style="height: 1px"> </td>
</tr>
<tr>
<td></td>
</tr>
</table>
<asp:repeater ID ="listRpt" runat ="server">
<ItemTemplate>
<table width ="778" height ="110" border="0" cellpadding="0" cellspacing="0" background="#D4D4D4">
<tr>
<td width="152" rowspan ="4" bgcolor="#FFFFFF" align ="center"><%#"<br><img src="+DataBinder.Eval(Container.DataItem,"shoppicture")+"border=0>" %></td>
<td width ="626" height="29" bgcolor ="#FFFFFF" class ="content">商品名称:<%#DataBinder.Eval(Container.DataItem,"shopname") %></td>
</tr>
<tr>
<td height ="28" bgcolor ="#FFFFFF" class ="content">商品介绍:<%#DataBinder.Eval(Container.DataItem,"shopexplain") %></td>
</tr>
<tr>
<td height ="26" bgcolor ="#FFFFFF" class ="content">商品价格:<%#DataBinder.Eval(Container.DataItem,"shopprice") %></td>
</tr>
<tr>
<td height="27" bgcolor ="#FFFFFF" ><a href ="buy.aspx?shiopid=<%#DataBinder.Eval(Container.DataItem,"shopid") %>"><img src ="../shopcart.jpg" border ="0"/></a></td>
</tr>
</table>
<table width ="778" height ="31" border ="0" cellpadding="0" cellspacing="0" >
<tr>
<td height ="15"></td>
</tr>
<tr>
<td height ="1" background ="../bg.jpg"></td>
</tr>
<tr>
<td height ="15"></td>
</tr>
</table>
</ItemTemplate>
</asp:repeater>
</div>
<uc2:buttom ID="Buttom1" runat="server" />
</form>
</body>
</html>
为什么中间那部分,运行的时候,显示不出来?
<%@ Register Src="buttom.ascx" TagName="buttom" TagPrefix="uc2" %><!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">
<LINK href="shopcss.css" type ="text/css" rel ="stylesheet">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div><uc1:top ID="Top1" runat="server" />
<%-- <uc1:top ID="Top1" runat="server" OnLoad="Top1_Load" />--%>
<table height ="31" cellpadding="0" cellspacing="0" width="778" border="0">
<tr>
<td height ="15"></td>
</tr>
<tr>
<td background="../bg.jpg" style="height: 1px"> </td>
</tr>
<tr>
<td></td>
</tr>
</table>
<asp:repeater ID ="listRpt" runat ="server">
<ItemTemplate>
<table width ="778" height ="110" border="0" cellpadding="0" cellspacing="0" background="#D4D4D4">
<tr>
<td width="152" rowspan ="4" bgcolor="#FFFFFF" align ="center"><%#"<br><img src="+DataBinder.Eval(Container.DataItem,"shoppicture")+"border=0>" %></td>
<td width ="626" height="29" bgcolor ="#FFFFFF" class ="content">商品名称:<%#DataBinder.Eval(Container.DataItem,"shopname") %></td>
</tr>
<tr>
<td height ="28" bgcolor ="#FFFFFF" class ="content">商品介绍:<%#DataBinder.Eval(Container.DataItem,"shopexplain") %></td>
</tr>
<tr>
<td height ="26" bgcolor ="#FFFFFF" class ="content">商品价格:<%#DataBinder.Eval(Container.DataItem,"shopprice") %></td>
</tr>
<tr>
<td height="27" bgcolor ="#FFFFFF" ><a href ="buy.aspx?shiopid=<%#DataBinder.Eval(Container.DataItem,"shopid") %>"><img src ="../shopcart.jpg" border ="0"/></a></td>
</tr>
</table>
<table width ="778" height ="31" border ="0" cellpadding="0" cellspacing="0" >
<tr>
<td height ="15"></td>
</tr>
<tr>
<td height ="1" background ="../bg.jpg"></td>
</tr>
<tr>
<td height ="15"></td>
</tr>
</table>
</ItemTemplate>
</asp:repeater>
</div>
<uc2:buttom ID="Buttom1" runat="server" />
</form>
</body>
</html>
为什么中间那部分,运行的时候,显示不出来?
有没有datasource和bind
改成<br> <img src='<%# Eval("shoppicture")%>' border=0>试试