温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:留缘木头Asp.net多用户留言板2.0
当前文件:
MultiuserGuestBook/index.aspx[21K,2009-6-12 11:47:56],打开代码结构图
MultiuserGuestBook/index.aspx[21K,2009-6-12 11:47:56],打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %> 2
3
<%@ Register Src="controlpart/footer.ascx" TagName="footer" TagPrefix="uc1" %> 4
<%@ Register Src="controlpart/header.ascx" TagName="header" TagPrefix="uc2" %> 5
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 6
<html xmlns="http://www.w3.org/1999/xhtml"> 7
<head runat="server"> 8
<title>你的留言空间</title> 9
<style type="text/css"> 10
td { font-size: 9pt; line-height: 12pt} 11
a:link {color: #0080FF; text-decoration: none } 12
a:visited {color: #0080FF; text-decoration: none } 13
a:hover {color: #ee9c00; text-decoration: underline } 14
</style> 15
</head> 16
<body background="img/bg01.gif"> 17
<form id="form1" runat="server"> 18
<div align="center"> 19
<uc2:header ID="Header1" runat="server" /> 20
<asp:Panel ID="Panel1" runat="server" Height="50px" Style="position: static" Width="125px"> 21
<table width="700" style="position: static" bgcolor="#f7f3ec"> 22
<tr> 23
<td align="center" colspan="5" height="100" style="width: 100%"> 24
<p align="center"> 25
没有该用户! 26
<br> 27
<br> 28
【<a href="reg.aspx" target="_self">申请留言本</a> 29
】</td> 30
</tr> 31
</table> 32
</asp:Panel> 33
<asp:Panel ID="Panel5" runat="server" Height="50px" Style="position: static" Width="125px"> 34
<table border="0" width="700" cellpadding="0" bgcolor="#f7f3ec" style="border-collapse: collapse; position: static;" 35
bordercolor="#111111" cellspacing="0" height="100%"> 36
<tr> 37
<td width="616" bgcolor="#ebebeb" colspan="2" style="height: 2px"> 38
</td> 39
<td bgcolor="#ebebeb" colspan="1" style="height: 2px" width="616"> 40
</td> 41
</tr> 42
<tr> 43
<td valign="bottom" nowrap style="width: 300px; height: 55px;" align="left"> 44
<img border="0" src="img/address.gif" height="20"><a href="index.aspx?user=" 45
target="_self"></a><font color="#225ccc"><%=Page.Title %>>> 第<%=pageddl.Text %>页</font></td> 46
<td valign="middle" nowrap style="width: 125px; height: 55px" align="center"> 47
<asp:Panel ID="headerPanel1" runat="server" Style="position: static" Width="150px" 48
HorizontalAlign="Center"> 49
<br /> 50
【<a href="edit.aspx?userid=<%= userid %>" target="_self"><font color="#ff0000">修改资料</font></a>】【<a 51
href="login.aspx?userid=<%= userid %>&exit=ok" target="_self"><font color="#ff0000">退出登陆</font></a>】</asp:Panel> 52
<asp:Panel ID="headerPanel2" runat="server" Style="position: static" Width="150px" 53
HorizontalAlign="Center"> 54
<br /> 55
【<a href="login.aspx?userid=<%=userid %>" target="_self">版主管理</a>】【<a href="reg.aspx" 56
target="_self">在线申请</a>】 57
</asp:Panel> 58
59
</td> 60
<td align="center" nowrap="nowrap" style="width: 125px; height: 55px" valign="middle"> 61
<a href="default.aspx" target="_self"> 62
【大门】</a></td> 63
</tr> 64
<tr> 65
<td width="616" colspan="2" style="height: 16px"> 66
<p align="left"> 67
</td> 68
<td colspan="1" style="height: 16px" width="616"> 69
</td> 70
</tr> 71
</table> 72
</asp:Panel> 73
<asp:Panel ID="Panel2" runat="server" Height="50px" Style="position: static" Width="125px"> 74
<asp:DataList ID="DataList1" runat="server" Style="position: static" OnItemDataBound="DataList1_ItemDataBound"> 75
<ItemTemplate> 76
<table border="0" width="700" cellpadding="0" bgcolor="#f7f3ec" style="border-collapse: collapse; 77
border-style: dotted; border-width: 2;" bordercolor="#808000" cellspacing="0"> 78
<tr> 79
<td width="244" valign="top" align="left" style="height: 13px"> 80
<img border="0" src="img/foot.gif"> 81
<font color="#0000ff"> 82
<%# Eval("name") %> 83
</font> 84
</td> 85
<td valign="top" style="width: 155px; height: 13px;"> 86
<p align="right"> 87
<font color="#9999ff"></font> 88
</td> 89
<center> 90
<td align="right" valign="top" width="155" style="height: 13px"> 91
<span style="color: #9999ff"> 92
<asp:Panel ID="itemPanel3" runat="server" Style="position: static" Height="3px"> 93
<span style="color: #9999ff">【</span><a href='re.aspx?userid=<%# Eval("userid") %>&id=<%# Eval("id") %>' 94
target="_self">回复</a><span style="color: #9999ff">】</span><span style="color: #9999ff">【</span><a 95
href='del.aspx?userid=<%# Eval("userid") %>&id=<%# Eval("id") %>'>删除</a><span style="color: #9999ff">】</span> 96
</asp:Panel> 97
</td> 98
<td rowspan="3" valign="top" style="width: 146px"> 99
<p align="center"> 100
</p> 101
<p align="center"> 102
<img border="0" src="face/<%# Eval("face") %>.gif"><br> 103
<br> 104
NO.<font color="#ff0000"><asp:Label ID="itemtxtid" runat="server" Text=""></asp:Label></font></p> 105
</td> 106
</center> 107
</tr> 108
<tr> 109
<td colspan="3" valign="top" style="border: 1px dotted #9966FF; height: 177px;" align="left"> 110
<p align="left"> 111
</p> 112
<font color="#6600ff"><span style="color: #0080ff"><a href="login.aspx?userid=<%=userid %>" 113
target="_self"> 114
<asp:Label ID="itemLabel1" runat="server" Style="position: static" Text="给版主的悄悄话..."></asp:Label></a></span><br /> 115
<br /> 116
<asp:Panel ID="itemPanel1" runat="server" Height="50px" Style="position: static" 117
Width="100%"> 118
<span style="color: #0080ff"></span><b><font color="#9966ff">悄悄话内容:</font></b><br> 119
<font color="#000000"> 120
<%#Eval("ly") %> 121
</font> 122
<br> 123
<br> 124
<img border="0" src="img/dot.gif" style="position: static"> 125
<font color="#6600ff">斑竹回复: </font> 126
<br> 127
<font color="#0033cc"> 128
<%# Eval("re") %> 129
</font> 130
</asp:Panel> 131
<asp:Panel ID="itemPanel2" runat="server" Height="50px" Style="position: static" 132
Width="100%"> 133
<font color="#000000"> 134
<%#Eval("ly") %> 135
</font> 136
<br /> 137
<font color="#6600ff">斑竹回复: </font> 138
<br> 139
<font color="#0033cc"> 140
<%# Eval("re") %> 141
</font> 142
</asp:Panel> 143
</font> 144
</td> 145
</tr> 146
<tr> 147
<td width="405" valign="bottom" colspan="2"> 148
<font color="#000000"><a href=""></a><a href="mailto:<%# Eval("email") %>"> 149
<asp:Image ID="Image1" runat="server" ImageUrl="~/img/email1.gif" Style="position: static" /></a> 150
<a href="<%# Eval("url") %>"> 151
<asp:Image ID="Image2" runat="server" ImageUrl="~/img/home1.gif" Style="position: static" /></a></font></td> 152
<td colspan="1" valign="bottom" width="405" style=""> 153
<font color="#0033cc">留言时间:<%# Eval("addtime") %></font> 154
</td> 155
</tr> 156
<tr> 157
<td width="640" colspan="4"> 158
</td> 159
</tr> 160
</table> 161
</ItemTemplate> 162
</asp:DataList><div style="text-align: center"> 163
<table border="0" cellpadding="0" cellspacing="0" width="700" align="center"> 164
<tr> 165
<td colspan="4" style="height: 29px" bgcolor="#f7f3ec" align="center"> 166
<asp:LinkButton ID="pageup" runat="server" OnClick="pageup_Click" Style=" 167
position: static;">上一页</asp:LinkButton> 168
<asp:DropDownList ID="pageddl" runat="server" AutoPostBack="True" 169
OnSelectedIndexChanged="pageddl_SelectedIndexChanged" Style="border: 1px dotted #2266FF; 170
position: static; Font-Size:12px" ForeColor="#0000C0" BackColor="#F7F3EC"> 171
</asp:DropDownList> 172
173
<asp:LinkButton ID="pagedown" runat="server" OnClick="pagedown_Click" Style=" position: static;">下一页</asp:LinkButton><asp:Label ID="pagelbl" runat="server" Style="position: static" 174
Text="1" Visible="False"></asp:Label></td> 175
</tr> 176
</table> 177
</div> 178
179
</asp:Panel> 180
<asp:Panel ID="Panel3" runat="server" Height="50px" Style="position: static" Width="125px"> 181
<table width="700" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" 182
cellspacing="0" bgcolor="#f7f3ec"> 183
<tr> 184
<td width="556" align="center" colspan="5" height="100"> 185
<p align="center"> 186
还没有留言!</td> 187
</tr> 188
</table> 189
</asp:Panel> 190
<asp:Panel ID="Panel4" runat="server" Height="50px" Style="position: static" Width="125px"> 191
<table border="2" cellspacing="0" cellpadding="6" style="border-style: dotted; border-collapse: collapse; 192
width: 698px; height: 222px; background-color: #f7f3ec;" bordercolor="#000FF"> 193
<tr> 194
<td style="width: 75px"> 195
<font color="#225ccc">十大热门排行</font></td> 196
<td rowspan="2" style="width: 100%"> 197
<table border="0" cellpadding="0" cellspacing="0" style="width: 576px; height: 116px"> 198
<tr> 199
<td nowrap width="30" style="height: 22px"> 200
<font color="#225ccc">姓名:</font></td> 201
<td nowrap colspan="2" align="left" style="height: 22px"> 202
<asp:TextBox ID="txtname" runat="server" Style="color: #333333; border: 1px dotted #9999FF; 203
background-color: #F7F3EC"></asp:TextBox> 204
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtname" 205
ErrorMessage="不能为空" Style="position: static">*</asp:RequiredFieldValidator><font color="#225ccc">留言性质: 206
<asp:RadioButton ID="rbtnshow" runat="server" Checked="True" Style="position: static" 207
Text="公开" GroupName="show" /> 208
<asp:RadioButton ID="RadioButton1" runat="server" Style="position: static" Text="悄悄话" 209
GroupName="show" /> 210
性别: 211
<asp:DropDownList ID="ddlsex" runat="server" Style="position: static" OnTextChanged="ddlsex_TextChanged" 212
AutoPostBack="True" BackColor="#F7F3EC"> 213
<asp:ListItem Selected="True" Value="m">男</asp:ListItem> 214
<asp:ListItem Value="w">女</asp:ListItem> 215
</asp:DropDownList> 表情: 216
<asp:DropDownList ID="ddlface" runat="server" Style="position: static" AutoPostBack="True" 217
BackColor="#F7F3EC" OnTextChanged="ddlsex_TextChanged"> 218
<asp:ListItem Selected="True" Value="01">酷像01</asp:ListItem> 219
<asp:ListItem Value="02">酷像02</asp:ListItem> 220
<asp:ListItem Value="03">酷像03</asp:ListItem> 221
<asp:ListItem Value="04">酷像04</asp:ListItem> 222
<asp:ListItem Value="05">酷像05</asp:ListItem> 223
<asp:ListItem Value="06">酷像06</asp:ListItem> 224
<asp:ListItem Value="07">酷像07</asp:ListItem> 225
<asp:ListItem Value="08">酷像08</asp:ListItem> 226
<asp:ListItem Value="09">酷像09</asp:ListItem> 227
<asp:ListItem Value="10">酷像10</asp:ListItem> 228
</asp:DropDownList></font></td> 229
</tr> 230
<tr> 231
<td nowrap width="30" style="height: 23px"> 232
<font color="#225ccc">信箱:</font></td> 233
<td align="left" style="width: 437px; height: 23px;"> 234
<asp:TextBox ID="txtemail" runat="server" Style="color: #333333; border: 1px dotted #9999FF; 235
background-color: #F7F3EC"></asp:TextBox> 236
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtemail" 237
ErrorMessage="Email格式不正确" Style="position: static" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td> 238
<td rowspan="3" style="width: 107px"> 239
<p align="center"> 240
<asp:Image ID="imgface" runat="server" ImageUrl="~/face/m01.gif" Style="position: static" 241
Height="116px" Width="116px" /> 242
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtly" 243
ErrorMessage="留言不能为空" Style="position: static">*</asp:RequiredFieldValidator> 244
</td> 245
</tr> 246
<tr> 247
<td nowrap="nowrap" width="30"> 248
<span style="color: #225ccc">主页:</span></td> 249
<td align="left" style="width: 437px"> 250
<asp:TextBox ID="txturl" runat="server" Style="color: #333333; border: 1px dotted #9999FF; 251
background-color: #F7F3EC; position: static;"></asp:TextBox><span style="color: #225ccc">格式为:</span><font color="#005588">http://XXX<asp:RegularExpressionValidator ID="RegularExpressionValidator2" 252
runat="server" ControlToValidate="txturl" ErrorMessage="网站地址不正确" Style="position: static" 253
ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator></font></td> 254
</tr> 255
<tr> 256
<td nowrap width="30"> 257
<font color="#225ccc">内容:</font></td> 258
<td style="width: 437px"> 259
<textarea name="ly" rows="5" wrap="hard" style="color: #333333; border: 1px dotted #9999FF; 260
background-color: #F7F3EC; width: 413px;" id="txtly" language="javascript" onclick="return TEXTAREA1_onclick()" 261
runat="server"></textarea></td> 262
</tr> 263
<tr> 264
<td colspan="3" style="height: 26px"> 265
<p align="center"> 266
<asp:Button ID="btnsave" runat="server" Style="border: 1px dotted #009900; background-color: #CCCC99" 267
Text="提交" OnClick="btnsave_Click" /> 268
269
<asp:Button ID="btnreset" runat="server" Style="border: 1px dotted #009900; background-color: #CCCC99; position: static;" 270
Text="重写" OnClick="btnreset_Click" CausesValidation="False" /></td> 271
</tr> 272
</table> 273
</td> 274
</tr> 275
<tr> 276
<td valign="top" style="height: 169px; width: 75px;"> 277
<asp:DataList ID="dlttop10" runat="server" Width="90" Style="position: static"> 278
<ItemTemplate> 279
<a href='index.aspx?userid=<%# Eval("userid") %>'><font color="#FF8080"> 280
<%# Eval("gbname") %> 281
</font></a> 282
</ItemTemplate> 283
</asp:DataList></td> 284
</tr> 285
<tr> 286
<td style="width: 75px"> 287
</table> 288
</asp:Panel> 289
<uc1:footer ID="Footer1" runat="server" /> 290
</div> 291
</form> 292
</body> 293
</html> 294





td 