📄 viewmessage.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewMessage.aspx.cs" Inherits="ViewMessage" %>
<!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">
<title>留言列表</title>
<link rel="stylesheet" href="css/css.css" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<center>
<div style="width:800px;">
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">我要留言</asp:LinkButton>
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDataBound="GridView1_RowDataBound" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="GridView1_RowCommand" DataKeyNames="PostID">
<EmptyDataTemplate>
暂无留言<a href="WriteMessage.aspx">发表第一条留言吧</a>
</EmptyDataTemplate>
<Columns>
<asp:TemplateField HeaderText="标题">
<ItemTemplate>
<a href='ReplyPage.aspx?id=<%#Eval("PostID")%>' title='回复主题:<%# Eval("title") %> '> <%# Eval("title") %> </a>
<asp:LinkButton ID="del" Visible="false" OnClientClick="return confirm('你真的要删除吗?');" runat="server">删除</asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="60%" />
</asp:TemplateField>
<asp:BoundField DataField="addTime" HeaderText="发表时间" >
<ItemStyle HorizontalAlign="Left" Width="20%" />
</asp:BoundField>
<asp:BoundField DataField="addUser" HeaderText="发布者" >
<ItemStyle HorizontalAlign="Left" Width="20%" />
</asp:BoundField>
</Columns>
<PagerStyle HorizontalAlign="Center" BackColor="#FFCC66" ForeColor="#333333" />
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</div></center>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -