温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:太糊留言板(VS2008+SQL2005)
当前文件:
TaiHuMessage/ShowMes.ascx,打开代码结构图
TaiHuMessage/ShowMes.ascx,打开代码结构图1<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShowMes.ascx.cs" Inherits="ShowMes" %> 2
<style type="text/css"> 3
.style1 4
{ 5
width: 700px; 6
margin-bottom: 0px; 7
} 8
.style2 9
{ 10
width: 100%; 11
} 12
</style> 13
<table align="center" cellpadding="0" cellspacing="0" class="style1"> 14
<tr> 15
<td> 16
最新留言:</td> 17
</tr> 18
<tr> 19
<td> 20
<asp:DataList ID="DataList1" runat="server" BackColor="White" 21
BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 22
GridLines="Both" Width="699px"> 23
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" /> 24
<ItemStyle BackColor="White" ForeColor="#330099" /> 25
<SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" /> 26
<SeparatorTemplate> 27
<hr style="background-color: #FF0000; color: #FF0000;" /> 28
</SeparatorTemplate> 29
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" /> 30
<ItemTemplate> 31
姓名: 32
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> 33
留言时间: 34
<asp:Label ID="timeLabel" runat="server" Text='<%# Eval("time") %>' /> 35
<hr /> 36
内容: <asp:Label ID="contentLabel" runat="server" Text='<%# Eval("content") %>' /> 37
<br /> 38
39
</ItemTemplate> 40
</asp:DataList> 41
</td> 42
</tr> 43
<tr> 44
<td> 45
<table class="style2"> 46
<tr> 47
<td> 48
当前页数:<asp:Label ID="Label1" runat="server" Text="1"></asp:Label> 49
</td> 50
<td> 51
<asp:Button ID="Button1" runat="server" Text="首页" onclick="Button1_Click" 52
CausesValidation="False" /> 53
</td> 54
<td> 55
<asp:Button ID="Button2" runat="server" Text="前页" onclick="Button2_Click" 56
CausesValidation="False" /> 57
</td> 58
<td> 59
<asp:Button ID="Button3" runat="server" Text="后页" onclick="Button3_Click" 60
CausesValidation="False" /> 61
</td> 62
<td> 63
<asp:Button ID="Button4" runat="server" Text="尾页" onclick="Button4_Click" 64
CausesValidation="False" /> 65
</td> 66
<td> 67
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> 68
</td> 69
<td> 70
转到:</td> 71
<td> 72
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 73
onselectedindexchanged="DropDownList1_SelectedIndexChanged"> 74
</asp:DropDownList> 75
</td> 76
<td> 77
<asp:Label ID="temp" runat="server" Text="Label" Visible="False"></asp:Label> 78
</td> 79
</tr> 80
</table> 81
</td> 82
</tr> 83
</table> 84



.style1


