netQT/student_message.aspx.cs

(完整代码) 1KB

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;
using CommonLib;

public partial class netQT_student_message : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int id = Convert.ToInt32(Session["S_ID"].ToString());
        string Checkcode = CookieHelper.GetCookieValue("CheckCode");
        if (Checkcode == TextBox2.Text)
        {
            string str = "insert into T_Message(Title,Content,S_ID,UserID,T_ID)values('" + TextBox1.Text + "','" + TextBox3.Text + "','" + id + "','','')";
            new DBExec().execSqlNoQry(str);
            JavaScriptHelper.Alert("提交成功!");
        }
        else
        {
            JavaScriptHelper.Alert("对不起您输入的验证码有误,请重新输入!");
        }

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
    }
}

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

AI 解读 AI

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

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