post.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;
using System.Data.SqlClient;

//该源码下载自www.51aspx.com(51aspx.com)
public partial class post : System.Web.UI.Page
{
    SqlConnection cn;
    DataSet ds = new DataSet();
    DataTable mytable = new DataTable();
    
//5_1_a_s_p_x.c_o_m

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int id = int.Parse(Request.QueryString["id"]);
            cn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["cn"]);
            cn.Open();
            SqlDataAdapter da = new SqlDataAdapter("select* from meeting where id=" + id, cn);
            da.Fill(ds, "meeting");
            mytable = ds.Tables["meeting"];
            this.txttouser.Text = Convert.ToString(mytable .Rows [0]["builder"]);
            this.txtfromuser.Text = Convert.ToString(Session ["username"]);
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.txtcontent.Text = "";
        this.txtcontent.Focus();
        this.Label1.Text = "";
        this.Labmessage.Text = "";
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
         int id = int.Parse(Request.QueryString["id"]);
        cn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["cn"]);
        cn.Open();
        SqlCommand cmd = new SqlCommand("select * from message where touser='" +this.txttouser .Text .Trim () + "'and fromuser='"+this.txtfromuser .Text .Trim ()+"'and content='"+this.txtcontent .Text .Trim ()+"'", cn);
        SqlDataReader dr = cmd.ExecuteReader();
        if (dr.Read())
        {
            Session["touser"] = dr["touser"].ToString();
            Session["fromuser"] = dr["fromuser"].ToString();
            Session["content"] = dr["content"].ToString();
            this.Label1.Visible = true;
        }
        else
        {
            dr.Close();
            SqlCommand cmd1 = new SqlCommand("insert into message(fromuser,touser,content,mid)values('" + this.txtfromuser.Text.Trim() + "','" + this.txttouser.Text.Trim() + "','" + this.txtcontent.Text.Trim().ToString() + "','" + id + "')", cn);
后面还有 12 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。