left.aspx.cs

来自「是个小区车辆管理系统」· CS 代码 · 共 36 行

CS
36
字号
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 Czy_Left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        //更新密码
        if (TextBox1.Text != TextBox2.Text)
        {
            Response.Write("<script>alert('密码不一致')</script>");
            return;
        }
        DataControl.Execute("update 人员 set 密码='" + this.TextBox1.Text + "' where  帐号='" + Session["帐号"].ToString() + "'");
        Page.ClientScript.RegisterStartupScript(this.GetType(), "test", "<script >alert('修改成功!');document.getElementById('userMenu').style.display='none';</script > ");

    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        //返回首页
        Session.Remove("帐号");
        Response.Write("<script>window.parent.location.href='../login.aspx';</script>");
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?