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

📄 bbs.aspx.cs

📁 多种模式留言系统 本留言系统 支持多种模式 一 签写留言模式 二 留言本模式 三 论坛模式 应用了第三的文本编辑器 支持动态更改网站标题 动态添加广告 支持留言头像选择
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class bbs : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        Server.Execute("pd.aspx");    
        GridView1.PageSize = odb.num("bbsnum");//设置每页显示的条目数
        
    }
    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {//鼠标行为
        e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#FFC0C0'");
        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c;");
    }
    protected void GridView1_DataBound(object sender, EventArgs e)
    {
        foreach (GridViewRow gr in GridView1.Rows)
        {//显示是否有回复
            CheckBox chk = (CheckBox)gr.Cells[3].FindControl("CheckBox1");
            string lid = ((Label)gr.Cells[3].FindControl("Label4")).Text.ToString();
            if (Convert.ToInt32(odb.scr("select count(*) from [read] where [lid]=" + lid + "")) > 0)
            {
                chk.Checked = true;
                chk.Text = "已回复";
            }
            else
            {
                chk.Checked = false;
                chk.Text = "无回复";
            }
        }
    }
}

⌨️ 快捷键说明

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