WebSite1/UserUpdata.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 WebSite1_UserUpdata : System.Web.UI.Page
{
    string STconnection = ConfigurationSettings.AppSettings["strconnection"];
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    
      
    //protected void Button1_Click(object sender, EventArgs e)
    //{
    //    Response.Redirect("../WebSite1/login.aspx");
    //}

    protected void Button1_Click1(object sender, EventArgs e)
    {
        if (Spassword.Text.Trim() != "")
        {
            if (Spassword2.Text.Trim() == Spassword3.Text.Trim())
            {
                string StrSehh = @"select*  from JianLi_User where User_Name='" + Session["NiName"].ToString() + "'and User_Password='" + Spassword.Text + "' ";
                SqlConnection conn = new SqlConnection(STconnection);
                conn.Open();
                SqlCommand cmmd = new SqlCommand(StrSehh, conn);
                SqlDataReader reed = cmmd.ExecuteReader();

                if (reed.Read())
                {

                    string StrUpdate = "update JianLi_User set User_Password = '" + Spassword2.Text + "' where User_Name = '" + Session["NiName"].ToString() + "'";

                    SqlConnection stconn = new SqlConnection(STconnection);
                    try
                    {
                        stconn.Open();
                        SqlCommand cmd = new SqlCommand(StrUpdate, stconn);
                        try
                        {
                            cmd.ExecuteNonQuery();
                            Response.Write("<script language='javascript'>alert('修改成功!');</script>");

                        }
                        catch (Exception e1) { System.Console.WriteLine(e1); }
                    }
                    catch (SqlException e3) { Response.Write(e3); }
                }
                else
                {
后面还有 11 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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