comment.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 admin_comment : Sper.baseuser
{
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!IsPostBack)
{
binddr();
}
}
string strtitel = "";
void binddr()
{
strtitel = txtcontent.Text.Trim();
string sql = "select * from comment ";
if (strtitel != "")
{
sql += " where content like '%" + strtitel + "%' ";
}
sql += " order by id desc";
DataView dv = new Tools().Query(sql).Tables[0].DefaultView;
PagedDataSource pds = new PagedDataSource();
AspNetPager1.RecordCount = dv.Count;
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
this.GridView1.DataSource = pds;
this.GridView1.DataBind();
}
protected void dellall(System.Object sender, System.EventArgs e)
{
int i;
string sql = "";
string myKeyid;
CheckBox mycheck = new CheckBox();
for (i = 0; i < GridView1.Rows.Count; i++)
{
mycheck = (CheckBox)GridView1.Rows[i].FindControl("mycheck");
if (mycheck.Checked == true)
{
myKeyid = GridView1.DataKeys[i].Value.ToString();
sql = "DELETE FROM comment where id=" + myKeyid;
new Tools().Query(sql);
后面还有 14 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
