⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searchcard.aspx

📁 用c#实现的BBS论坛。主要提供了三种角色:游客(没有注册的用户)、已经注册的用户和后台管理员。当游客进入论坛之后
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SearchCard.aspx.cs" Inherits="FrontDesk_SearchCard" %>

<%@ Register Src="BBSFooter.ascx" TagName="BBSFooter" TagPrefix="uc3" %>

<%@ Register Src="BBSHeader.ascx" TagName="BBSHeader" TagPrefix="uc1" %>
<%@ Register Src="../../UserControl/UserLogin.ascx" TagName="UserLogin" TagPrefix="uc2" %>
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table align="center" style="width: 755px; height: 138px;" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 755px;vertical-align: top; height: 138px;">
                    <uc1:BBSHeader ID="BBSHeader1" runat="server" />
                </td></tr> 
                </table> 
        <table align="center" style="width: 755px;" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 176px;vertical-align: top; text-align: center; background-image: url(../../Image/菜单.jpg); height: 363px;">
                    &nbsp;<uc2:UserLogin ID="UserLogin1" runat="server" />
                </td>
                <td style="width: 579px; text-align: center; background-image: url(../../Image/背景.jpg); vertical-align: top; height: 363px;">
                    <br />
                    <asp:Label ID="labCondition" runat="server" Font-Size="9pt">查询条件</asp:Label>
                    <asp:DropDownList ID="ddlCondition" runat="server" Font-Size="9pt">
                        <asp:ListItem Value="CardID">帖子ID</asp:ListItem>
                        <asp:ListItem Value="UserID">用户ID</asp:ListItem>
                        <asp:ListItem Value="ModuleID">模块ID</asp:ListItem>
                        <asp:ListItem Value="CardName">帖子名称</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="labKeyWord" runat="server" Font-Size="9pt">关键字</asp:Label>
                    <asp:TextBox ID="txtKeyWord" runat="server" Font-Size="9pt"></asp:TextBox>&nbsp;
                    <asp:Button ID="btnSelect" runat="server" Text="查找" Font-Size="9pt" OnClick="btnSelect_Click" />
                    <asp:Button ID="btnBack" runat="server" Text="返回" Font-Size="9pt" OnClick="btnBack_Click" />
                    <br />
                    <br />
                    <asp:GridView ID="gvCardInfo" runat="server" AllowPaging="True" CellPadding="3"
                        GridLines="Horizontal"  Width="570px" BorderColor="#E7E7FF" BorderStyle="None" HorizontalAlign="Center" AutoGenerateColumns="False" Font-Size="9pt" OnPageIndexChanging="gvCardInfo_PageIndexChanging" PageSize="5" BackColor="White" BorderWidth="1px">
                        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                        <Columns>
                            <asp:BoundField DataField="CardID" HeaderText="帖子ID">
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="UserID" HeaderText="用户ID" >
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="ModuleID" HeaderText="模块ID" >
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CardName" HeaderText="帖子名称" >
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CardContent" HeaderText="帖子内容" >
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CardDate" HeaderText="发帖日期" >
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:BoundField>
                            <asp:HyperLinkField DataNavigateUrlFields="CardID" DataNavigateUrlFormatString="Card.aspx?CardID={0}"
                                HeaderText="详细信息" Text="详细信息" >
                             <ControlStyle Font-Underline="False" />
                             <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                         </asp:HyperLinkField>
                        </Columns>
                         <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <AlternatingRowStyle BackColor="#F7F7F7" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
      <table align="center" style="width: 755px" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 755px;vertical-align: top; height: 74px;">
                    <uc3:BBSFooter ID="BBSFooter1" runat="server" />
                </td></tr> 
                </table> 
    </div>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -