温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:网上办公系统源码
当前文件路径:OfficeOnline/BBS/BBS_List.aspx

1<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BBS_List.aspx.cs" Inherits="BBS_BBS_List" Title="Untitled Page" %> 2
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 3
<table style="width: 650px; height: 500px"> 4
<tr> 5
<td colspan="3" rowspan="1" style="height: 50px; background-color: #ffffcc"> 6
<span style="font-size: 24pt; font-family: 楷体_GB2312">BBS主题列表</span></td> 7
</tr> 8
<tr> 9
<td colspan="3" rowspan="1" style="height: 400px" valign="top"> 10
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=(local);Initial Catalog=OfficeOnline;User ID=sa;Password=sa" 11
ProviderName="System.Data.SqlClient" SelectCommand="SELECT z_BbsMessage.BM_ID, z_BbsMessage.BM_Title, z_BbsMessage.BM_AddDate, z_BbsMessage.BM_Replies, z_Person.Person_UserName FROM z_BbsMessage INNER JOIN z_Person ON z_BbsMessage.BM_AddPersonID = z_Person.Person_ID ORDER BY z_BbsMessage.BM_AddDate DESC"> 12
</asp:SqlDataSource> 13
<table style="width: 591px"> 14
<tr> 15
<td colspan="3" rowspan="3" style="text-align: left"> 16
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/BBS/BBS_Add.aspx">发表新主题</asp:HyperLink></td> 17
</tr> 18
<tr> 19
</tr> 20
<tr> 21
</tr> 22
</table> 23
<br /> 24
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" 25
CellPadding="4" DataKeyNames="BM_ID" DataSourceID="SqlDataSource1" ForeColor="#333333" 26
GridLines="None" Width="600px"> 27
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> 28
<Columns> 29
<asp:TemplateField HeaderText="主题"> 30
<ItemTemplate> 31
<asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%# Eval("BM_ID") %>' 32
Text='<%# Eval("BM_Title") %>' OnCommand="LinkButton1_Command"></asp:LinkButton> 33
</ItemTemplate> 34
</asp:TemplateField> 35
<asp:BoundField DataField="Person_UserName" HeaderText="作者" SortExpression="BM_AddPersonID" /> 36
<asp:BoundField DataField="BM_Replies" HeaderText="回复数" SortExpression="BM_Replies" /> 37
<asp:BoundField DataField="BM_AddDate" HeaderText="发表时间" SortExpression="BM_AddDate" /> 38
</Columns> 39
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /> 40
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /> 41
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /> 42
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /> 43
<AlternatingRowStyle BackColor="White" /> 44
</asp:GridView> 45
46
</td> 47
</tr> 48
<tr> 49
<td colspan="3" rowspan="3" style="height: 50px"> 50
</td> 51
</tr> 52
<tr> 53
</tr> 54
<tr> 55
</tr> 56
</table> 57
</asp:Content> 58
59




