郁闷了一天的问题结果还有问题(我承认自己很SB)
我是用VS2005+access做留言板的那个 用的是 <asp:Repeater><ItemTemplate><table>......../ItemTemplate></asp:Repeater>
这样的 另外留言和回复是2个表 sql语句是2表关联查询:string sql = "select a.[Name] as AName,a.[Title],a.[Content] as AContent,a.[Publishdate],a.[ImageURL],b.[Name] as BName,b.[Content] as BContent,b.[Returndate] from Mes a left join Reply b on a.ID=b.MesID
页面代码:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px;width:100px; background-color:Blue; text-align:left">
发帖者:<%# Eval("AName")%>
</td>
<td style="height:32px; width:400px; background-color:White; text-align:left">
标题:<%# Eval("Title")%>
</td>
</tr>
<tr>
<td style="height:150px; width:100px; background-color:White; text-align:center">
<asp:Image ID="Image1" runat="server" ImageUrl="~/behindimages/pic1.gif" />
</td>
<td style="height:32px; width:400px; background-color:Green; text-align:center;" rowspan="2">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px; width:400px; background-color:Fuchsia; text-align:left">
内容:<%# Eval("AContent")%>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left">
回复人:<%# Eval("BName")%>
</td>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left">
回复时间:<%# Eval("Returndate")%>
</td>
</tr>
<tr>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left" colspan="2">
回复内容:<%# Eval("BContent")%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height:32px; width:100px; background-color:Red; text-align:left">
发帖时间:<%# Eval("Publishdate")%>
</td>
<td></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
基本的现在可以显出来了 不过问题又来了 这样不能像Gridview一样自己分页 全部显示到一列了 而且还有个问题是留言头像怎么让他绑定我查询出来的图片路径 还有就是留言如果没回复就显示暂无回复 而不是还继续这样显示出回复人、回复时间还都是空的 拜托各路高手来指点一下 小的感激涕零~ 不能在线= 要明天才上了 能解决的希望大家帮忙下
路过的也帮忙Up一下啊 谢谢了
这样的 另外留言和回复是2个表 sql语句是2表关联查询:string sql = "select a.[Name] as AName,a.[Title],a.[Content] as AContent,a.[Publishdate],a.[ImageURL],b.[Name] as BName,b.[Content] as BContent,b.[Returndate] from Mes a left join Reply b on a.ID=b.MesID
页面代码:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px;width:100px; background-color:Blue; text-align:left">
发帖者:<%# Eval("AName")%>
</td>
<td style="height:32px; width:400px; background-color:White; text-align:left">
标题:<%# Eval("Title")%>
</td>
</tr>
<tr>
<td style="height:150px; width:100px; background-color:White; text-align:center">
<asp:Image ID="Image1" runat="server" ImageUrl="~/behindimages/pic1.gif" />
</td>
<td style="height:32px; width:400px; background-color:Green; text-align:center;" rowspan="2">
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px; width:400px; background-color:Fuchsia; text-align:left">
内容:<%# Eval("AContent")%>
</td>
</tr>
</table>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left">
回复人:<%# Eval("BName")%>
</td>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left">
回复时间:<%# Eval("Returndate")%>
</td>
</tr>
<tr>
<td style="height:32px; width:400px; background-color:Transparent; text-align:left" colspan="2">
回复内容:<%# Eval("BContent")%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height:32px; width:100px; background-color:Red; text-align:left">
发帖时间:<%# Eval("Publishdate")%>
</td>
<td></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
基本的现在可以显出来了 不过问题又来了 这样不能像Gridview一样自己分页 全部显示到一列了 而且还有个问题是留言头像怎么让他绑定我查询出来的图片路径 还有就是留言如果没回复就显示暂无回复 而不是还继续这样显示出回复人、回复时间还都是空的 拜托各路高手来指点一下 小的感激涕零~ 不能在线= 要明天才上了 能解决的希望大家帮忙下
路过的也帮忙Up一下啊 谢谢了
...全文
相关推荐
郁闷发泄专家2007
在现代社会的快节奏生活中,工作和生活压力不断增大,人们常常感到焦虑和郁闷,情绪压力的调节成为了许多人必须面对的问题。
谈谈职场上你最郁闷什么.doc
总之,职场郁闷是多种因素共同作用的结果。个人、企业乃至社会都应该关注这一问题,并采取相应的措施来缓解职场的郁闷情绪。对于个人来说,培养良好的心理素质和人际关系处理能力是应对职场挑战的重要手段。
郁闷发泄者
【标题】:“郁闷发泄者”实际上是一款专为那些感到无聊或者需要释放压力的人设计的软件集合。
控制屏幕郁闷发泄专家
控制屏幕郁闷发泄专家控制屏幕郁闷发泄专家
PJBlog2 郁闷的圣诞
郁闷的圣诞"这个主题是PJBlog模板的一个实例,它可能包含以下内容:1.


