温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:51aspx修正版简单三层留言板源码
当前文件:
LeaveMessageMVC/LMListForPublic.aspx,打开代码结构图
LeaveMessageMVC/LMListForPublic.aspx,打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" Inherits="LMListForPublic" Codebehind="LMListForPublic.aspx.cs" %> 2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4
5
<html xmlns="http://www.w3.org/1999/xhtml" > 6
<head id="Head1" runat="server"> 7
<title>浏览所有留言信息</title> 8
</head> 9
<body> 10
<form id="form1" runat="server"> 11
<div> 12
<span style="font-size: 16pt"><strong> 13
显示所有留言<br /> 14
</strong></span> 15
<a href="index.aspx">回到主页</a> 16
<br /> 17
<br /> 18
<asp:GridView ID="LMGridView" runat="server" AutoGenerateColumns="false" ShowHeader="false" GridLines="none" Width="700px" OnRowCommand="LMGridView_RowCommand"> 19
<Columns> 20
<asp:TemplateField> 21
<ItemTemplate> 22
<table border="1" cellpadding="0" cellspacing="0" width="100%"> 23
<tr> 24
<th style="text-align:left; border-right:0px; width:70%"> 25
<span><%--调用JavaScript实现记录楼数--%> 26
<%--<script type="text/javascript" src="JS/ShowFloorAtLMBox.js"></script>--%> 27
</span> 28
<!--主题:--><%# TitleAndFloor(Convert.ToString(DataBinder.Eval(Container.DataItem,"Title"))) %></th> 29
<td align="right" style="border-left:0px; width:30%"><asp:Button ID="wb" runat="server" CommandName=<%# DataBinder.Eval(Container.DataItem,"ID") %> Text="回复"/> | <a href="#IwantToSay">滚动到最下</a> | <a href="#" onclick="javascript:scroll(0,0);">Top</a> </td> 30
</tr> 31
<tr> 32
<td style="font-size:smaller" colspan="2"> 33
作者:<%# DataBinder.Eval(Container.DataItem,"User") %> 34
35
QQ/MSN:<%# DataBinder.Eval(Container.DataItem,"QQMSN") %> 36
37
<font color="gray"><%# DataBinder.Eval(Container.DataItem,"SubmitTime") %></font> 38
</td> 39
</tr> 40
<tr> 41
<td colspan="2"> 42
<div style="margin-left:4px; margin-right:4px; margin-top:2px; margin-bottom:2px"> 43
<asp:Label ID="LContents" runat="server" Width="100%" Text=<%# DataBinder.Eval(Container.DataItem,"Contents") %> style="word-break:break-all" /> 44
<br /> 45
<hr /> 46
<div style=" margin-left:2px; margin-right:2px; color:Gray; font-size:smaller"> 47
<asp:Label ID="LWriteBack" runat="server" Width="100%" Text=<%# DataBinder.Eval(Container.DataItem,"WriteBack") %> style="word-break:break-all" /> 48
</div> 49
</div> 50
</td> 51
</tr> 52
</table> 53
</ItemTemplate> 54
</asp:TemplateField> 55
</Columns> 56
</asp:GridView> 57
<asp:Label ID="PageNumber" runat="server" Text="1"></asp:Label> 58
<asp:LinkButton ID="Prev" runat="server" Enabled="False" OnClick="Prev_Click">上一页</asp:LinkButton> 59
<asp:LinkButton ID="Next" runat="server" OnClick="Next_Click">下一页</asp:LinkButton> 60
<br /> 61
<table id="lmt" border="1" style="width: 700px; height: 180px"> 62
<tr> 63
<td style="width: 100%; height:25px"> 64
用户名:<asp:TextBox ID="TBuser" runat="server" Height="21px" Width="150px"></asp:TextBox> <span 65
style="color: #ff0033">*</span> 66
QQ / MSN:<asp:TextBox ID="TBQQMSN" runat="server" Height="21px" Width="150px"></asp:TextBox> 67
<span style="color: #ff0033">*</span></td> 68
</tr> 69
<tr> 70
<td style="width: 100%; height:25px"> 71
留言标题:<asp:TextBox ID="TBtitle" runat="server" Height="21px" Width="412px"></asp:TextBox></td> 72
</tr> 73
<tr> 74
<td style="width: 100%; height:100px"> 75
留言信息:<span style="font-size:small; color:Gray">(按 Ctrl+Enter 提交)</span><br /> 76
<asp:TextBox ID="TBcontents" runat="server" Height="80px" Width="90%" TextMode="MultiLine"></asp:TextBox> 77
<span style="color: #ff0000">*</span></td> 78
</tr> 79
<tr> 80
<td style="width: 100%; height:30px; text-align: center;"> 81
<asp:Button ID="Submit" runat="server" Text="提交" Width="100px" OnClick="Submit_Click" /></td> 82
</tr> 83
</table> 84
<br /> 85
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 86
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="管理" /> 87
(Type in "51aspx")<a name="IwantToSay"/></div> 88
</form> 89
</body> 90
</html> 91



