zhuce.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;

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

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection();
        con.ConnectionString = "Data Source=.\\sqlexpress;Initial Catalog=information;Integrated Security=True";
        con.Open();
        string b = "insert into userfor(username,userpassword,usersex,userage,useraddress,usermail) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + DropDownList1.SelectedItem.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "')";
        SqlCommand sqlcom = new SqlCommand(b, con);
        sqlcom.CommandText = b;

        sqlcom.ExecuteNonQuery();
        con.Close();
        Response.Redirect("denglu.aspx", true);

    }


    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {

    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        SqlConnection con1 = new SqlConnection();
        con1.ConnectionString = "Data Source=.\\sqlexpress;Initial Catalog=information;Integrated Security=True";
        con1.Open();
        string a = "select * from userfor where username='" + TextBox1.Text + "'";
        SqlCommand sqlcom = new SqlCommand(a, con1);
        SqlDataReader read = sqlcom.ExecuteReader();
        if (TextBox1.Text == "")
        {
            Label1.Visible = true;
            Label1.Text = "用户名不能为空";

        }
后面还有 14 行代码,解锁后查看完整代码

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

AI 解读

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

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